GNU bug report logs - #66177
[PATCH 0/5] Improve python-django-4.2 phases.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sun, 24 Sep 2023 10:19:01 UTC

Severity: normal

Tags: patch

Done: jgart <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 66177 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr, Lars-Dominik Braun <lars <at> 6xq.net>, Marius Bakke <marius <at> gnu.org>, jgart <jgart <at> dismail.de>
Subject: [bug#66177] [PATCH 1/5] gnu: python-django-4.2: Use test-flags argument.
Date: Sun, 24 Sep 2023 12:25:46 +0200
* gnu/packages/django.scm (python-django-4.2): Use test-flags argument.
---
 gnu/packages/django.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 4060819a35..f07433b10b 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -66,7 +66,12 @@ (define-public python-django-4.2
                 "1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     '(#:test-flags
+       (list
+        ;; By default tests run in parallel, which may cause various race
+        ;; conditions.  Run sequentially for consistent results.
+        "--parallel=1")
+       #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
            (lambda* (#:key inputs #:allow-other-keys)
@@ -85,16 +90,12 @@ (define-public python-django-4.2
                 (string-append "    @unittest.skipIf(True, 'Disabled by Guix')\n"
                                all)))))
          (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
+           (lambda* (#:key tests? test-flags #:allow-other-keys)
              (if tests?
                  (with-directory-excursion "tests"
                    ;; Tests expect PYTHONPATH to contain the root directory.
                    (setenv "PYTHONPATH" "..")
-                   (invoke "python" "runtests.py"
-                           ;; By default tests run in parallel, which may cause
-                           ;; various race conditions.  Run sequentially for
-                           ;; consistent results.
-                           "--parallel=1"))
+                   (apply invoke "python" "runtests.py" test-flags))
                  (format #t "test suite not run~%"))))
          ;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
          ;; see <https://bugs.gnu.org/25235>.  The django-admin script typically

base-commit: cc6fac3311f079c92c76a60192d93623eb094881
-- 
2.41.0





This bug report was last modified 1 year and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.