From d51daf25c4210bdfe8e4d9db096bb8ccf088d3b4 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 01:00:38 +0200 Subject: gnu: gunicorn: Respect '--without-tests'. * gnu/packages/python-web.scm (gunicorn)[arguments]: Only run tests when TESTS? is #true. --- gnu/packages/python-web.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index f13fb5b5c2..8b6b667c3f 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge -;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke +;;; Copyright © 2016, 2017, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2017 Roel Janssen ;;; Copyright © 2016, 2017, 2020 Julien Lepiller @@ -4708,10 +4708,13 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (delete-file "docs/build/texinfo/Gunicorn.texi") #t)) (replace 'check - (lambda _ - (setenv "PYTHONPATH" - (string-append ".:" (getenv "PYTHONPATH"))) - (invoke "pytest"))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (setenv "PYTHONPATH" + (string-append ".:" (getenv "PYTHONPATH"))) + (invoke "pytest" "-vv")) + (format #t "test suite not run~%")))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let* ((doc (string-append (assoc-ref outputs "doc") -- cgit v1.2.3