From e337061b3a7af892d3a14f5191efb2487ec0fad9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 17 Apr 2019 23:39:39 -0400 Subject: gnu: python: Disable failing tests for Python 2. Fixes issue #35311 (see: https://bugs.gnu.org/35311). * gnu/packages/python.scm (python-2.7)[make-flags]: Exclude the tests test_urllib2_localnet and test_httplib. * gnu/packages/python.scm (python-3.7)[make-flags]: Do not consider tests exclusions inherited from the python2 package, which leaves Python 3 unchanged. --- gnu/packages/python.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index aa2f8addcf..a26a88e6d9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -54,7 +54,7 @@ ;;; Copyright © 2018 Nicolas Goaziou ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2018 Clément Lassieur -;;; Copyright © 2018 Maxim Cournoyer +;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian ;;; @@ -147,7 +147,14 @@ (assoc-ref %outputs "out") "/lib")) ;; With no -j argument tests use all available cpus, so provide one. #:make-flags - (list (format #f "TESTOPTS=-j~d" (parallel-job-count))) + (list (string-append + (format #f "TESTOPTS=-j~d" (parallel-job-count)) + ;; Exclude the following tests as they fail + ;; non-deterministically with "error: [Errno 104] Connection + ;; reset by peer." Python 3 seems unaffected. A potential fix, + ;; yet to be backported to Python 2, is available at: + ;; https://github.com/python/cpython/commit/529525fb5a8fd9b96ab4021311a598c77588b918. + " --exclude test_urllib2_localnet test_httplib")) #:modules ((ice-9 ftw) (ice-9 match) (guix build utils) (guix build gnu-build-system)) @@ -344,6 +351,9 @@ data types.") #t)))) (arguments (substitute-keyword-arguments (package-arguments python-2) + ((#:make-flags _) + ;; Strip tests exclusions that have to do with Python 2 only. + `(list (format #f "TESTOPTS=-j~d" (parallel-job-count)))) ((#:phases phases) `(modify-phases ,phases ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it -- cgit v1.2.3