]> git.pld-linux.org Git - packages/python-gevent.git/commitdiff
Run tests in %build
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 21 Feb 2014 12:20:45 +0000 (13:20 +0100)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 21 Feb 2014 12:20:45 +0000 (13:20 +0100)
known_failures-pld.txt [new file with mode: 0644]
python-gevent.spec

diff --git a/known_failures-pld.txt b/known_failures-pld.txt
new file mode 100644 (file)
index 0000000..dccf68a
--- /dev/null
@@ -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
+
index f91b14c920da2c70ae664189f178900b2a9b8eaa..3548a756755358f95a2e4423e9a1cd206d33c57d 100644 (file)
@@ -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
 
This page took 0.058458 seconds and 4 git commands to generate.