[packages/python-gevent] Run tests in %build

jajcus jajcus at pld-linux.org
Fri Feb 21 13:21:09 CET 2014


commit 11497ff2b6a87dba4101cf06506d569f045d4d3d
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Fri Feb 21 13:20:45 2014 +0100

    Run tests in %build

 known_failures-pld.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++
 python-gevent.spec     | 17 +++++++++++++++++
 2 files changed, 61 insertions(+)
---
diff --git a/python-gevent.spec b/python-gevent.spec
index f91b14c..3548a75 100644
--- a/python-gevent.spec
+++ b/python-gevent.spec
@@ -1,3 +1,11 @@
+
+# TODO:
+#	- investigate some of the failing tests
+#	  (now excluded via known_failures-pld.txt)
+
+# Conditional build:
+%bcond_without	tests	# do not run tests
+
 %define     module  gevent
 Summary:	A coroutine-based Python networking library
 Name:		python-%{module}
@@ -8,6 +16,7 @@ Group:		Development/Languages
 URL:		http://www.gevent.org/
 Source0:	http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
 # Source0-md5:	33aef51a06268f5903fea378e1388e4d
+Source1:	known_failures-pld.txt
 BuildRequires:	libevent-devel >= 1.4.0
 BuildRequires:	python-devel
 BuildRequires:	rpm-pythonprov
@@ -30,6 +39,8 @@ Features include:
 %prep
 %setup -q -n %{module}-%{version}
 
+cat known_failures.txt %{SOURCE1} > known_failures-merged.txt
+
 %build
 CC="%{__cc}" \
 CFLAGS="%{rpmcflags}" \
@@ -44,6 +55,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %py_postclean
 
+%if %{with tests}
+cd greentest
+PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt
+cd ..
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
diff --git a/known_failures-pld.txt b/known_failures-pld.txt
new file mode 100644
index 0000000..dccf68a
--- /dev/null
+++ b/known_failures-pld.txt
@@ -0,0 +1,44 @@
+######################################################
+# Problems which should be investigated
+
+# AttributeError: 'module' object has no attribute '_url_collapse_path_split'
+* * * -u -m monkey_test --Event test_httpservers.py
+* * * -u -m monkey_test test_httpservers.py
+
+#   AssertionError: The 304 response must have no body
+# and:
+#       File "/home/users/jajcus/rpm/BUILD/gevent-1.0/gevent/hub.py", line 331, in s
+#         return greenlet.switch(self)
+#     Timeout: 1 second: test timed out
+* * * -u test__pywsgi.py
+
+######################################################
+# Tests which may fail on our builders
+
+# uses network, fragile to proxy settings
+* * * -u -m monkey_test test_urllib2_localnet.py
+* * * -u -m monkey_test --Event test_urllib2_localnet.py
+
+# depends on external URL accessibility
+* * * -u -m monkey_test test_urllib2net.py
+* * * -u -m monkey_test --Event test_urllib2net.py
+
+# requires webpy, not in PLD
+# has expectations on local TCP ports availability
+* * * -u test___example_servers.py
+
+# fragile to local proxy settings
+* * * -u test__greenness.py
+
+#    File "test__socket.py", line 140, in test_sendall_timeout
+#      self.assertRaises(self.TIMEOUT_ERROR, client.sendall, data_sent)
+#  AssertionError: timeout not raised
+* * * -u test__socket.py
+
+# uses DNS and external URLs,
+# requires 'sendfile' python module
+* * * -u test__examples.py
+
+# expects local TCP port 6000 being available
+* * * -u test__example_echoserver.py
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-gevent.git/commitdiff/11497ff2b6a87dba4101cf06506d569f045d4d3d



More information about the pld-cvs-commit mailing list