summary refs log tree commit diff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-05-05 21:21:03 +0200
committerMarius Bakke <marius@gnu.org>2021-05-05 23:48:20 +0200
commite35522238244961331a8f0a7059362a8ceeef6ed (patch)
tree587ebbc3e6be163ca6b039181a8d337f382ad4b0 /gnu/packages/django.scm
parent4ae8390ffc23cbe70df888d88646941207701845 (diff)
downloadguix-e35522238244961331a8f0a7059362a8ceeef6ed.tar.gz
gnu: python-django: Support '--without-tests'.
* gnu/packages/django.scm (python-django)[arguments]: Test for TESTS? in the
'check' phase.
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm22
1 files changed, 12 insertions, 10 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 9b5593f709..b5a5cd3045 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
-;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -87,15 +87,17 @@
 
              #t))
          (replace 'check
-           (lambda _
-             (with-directory-excursion "tests"
-               (setenv "PYTHONPATH"
-                       (string-append "..:" (getenv "PYTHONPATH")))
-               (invoke "python" "runtests.py"
-                       ;; By default tests run in parallel, which may cause
-                       ;; various race conditions.  Run sequentially for
-                       ;; consistent results.
-                       "--parallel=1")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (if tests?
+                 (with-directory-excursion "tests"
+                   (setenv "PYTHONPATH"
+                           (string-append "..:" (getenv "PYTHONPATH")))
+                   (invoke "python" "runtests.py"
+                           ;; By default tests run in parallel, which may cause
+                           ;; various race conditions.  Run sequentially for
+                           ;; consistent results.
+                           "--parallel=1"))
+                 (format #t "test suite not run~%")))))))
     ;; TODO: Install extras/django_bash_completion.
     (native-inputs
      `(("tzdata" ,tzdata-for-tests)