me
/
guix
Archived
1
0
Fork 0

gnu: python-pyopenssl: Fix test failure.

* gnu/packages/python-crypto.scm (python-pyopenssl)[native-inputs]: Add LIBFAKETIME.
[arguments]: Use it to run tests with a fixed date.

(cherry picked from commit 84f1e12b8b)
master
Marius Bakke 2020-01-08 20:58:19 +01:00
parent 64fc4f3705
commit 55e51b6615
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name> ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au> ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
@ -488,7 +488,10 @@ message digests and key derivation functions.")
(add-after 'install 'check (add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs) (add-installed-pythonpath inputs outputs)
(invoke "py.test" "-v" "-k" ;; PyOpenSSL runs tests against a certificate with a fixed
;; expiry time. To ensure successful builds in the future,
;; set the time to roughly the release date.
(invoke "faketime" "2019-01-01" "py.test" "-v" "-k"
(string-append (string-append
;; This test tries to look up certificates from ;; This test tries to look up certificates from
;; the compiled-in default path in OpenSSL, which ;; the compiled-in default path in OpenSSL, which
@ -503,7 +506,8 @@ message digests and key derivation functions.")
(inputs (inputs
`(("openssl" ,openssl))) `(("openssl" ,openssl)))
(native-inputs (native-inputs
`(("python-flaky" ,python-flaky) `(("libfaketime" ,libfaketime)
("python-flaky" ,python-flaky)
("python-pretend" ,python-pretend) ("python-pretend" ,python-pretend)
("python-pytest" ,python-pytest))) ("python-pytest" ,python-pytest)))
(home-page "https://github.com/pyca/pyopenssl") (home-page "https://github.com/pyca/pyopenssl")