From 84f1e12b8b84acca1b3be7d41daacce28feb391d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 20:58:19 +0100 Subject: 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. --- gnu/packages/python-crypto.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 63d3be17c2..b9e32109ae 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari -;;; Copyright © 2016, 2017 Marius Bakke +;;; Copyright © 2016, 2017, 2020 Marius Bakke ;;; Copyright © 2017 Ben Sturmfels ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2015 Cyril Roelandt @@ -448,7 +448,10 @@ (define-public python-pyopenssl (add-after 'install 'check (lambda* (#:key inputs outputs #:allow-other-keys) (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 ;; This test tries to look up certificates from ;; the compiled-in default path in OpenSSL, which @@ -463,7 +466,8 @@ (define-public python-pyopenssl (inputs `(("openssl" ,openssl))) (native-inputs - `(("python-flaky" ,python-flaky) + `(("libfaketime" ,libfaketime) + ("python-flaky" ,python-flaky) ("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest))) (home-page "https://github.com/pyca/pyopenssl") -- cgit v1.2.3