[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: python: Disable failing tests for Python 2.
From: |
guix-commits |
Subject: |
02/02: gnu: python: Disable failing tests for Python 2. |
Date: |
Fri, 19 Apr 2019 09:43:49 -0400 (EDT) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit e337061b3a7af892d3a14f5191efb2487ec0fad9
Author: Maxim Cournoyer <address@hidden>
Date: Wed Apr 17 23:39:39 2019 -0400
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(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index aa2f8ad..a26a88e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -54,7 +54,7 @@
;;; Copyright © 2018 Nicolas Goaziou <address@hidden>
;;; Copyright © 2018 Oleg Pykhalov <address@hidden>
;;; Copyright © 2018 Clément Lassieur <address@hidden>
-;;; Copyright © 2018 Maxim Cournoyer <address@hidden>
+;;; Copyright © 2018, 2019 Maxim Cournoyer <address@hidden>
;;; Copyright © 2018 Luther Thompson <address@hidden>
;;; Copyright © 2018 Vagrant Cascadian <address@hidden>
;;;
@@ -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