mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
gnu: python-django-4.2: Use test-flags argument.
* gnu/packages/django.scm (python-django-4.2): Use test-flags argument. Signed-off-by: jgart <jgart@dismail.de>
This commit is contained in:
parent
1a7228b151
commit
5035e6d06d
1 changed files with 8 additions and 7 deletions
|
@ -66,7 +66,12 @@ (define-public python-django-4.2
|
||||||
"1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
|
"1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(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
|
(modify-phases %standard-phases
|
||||||
(add-before 'check 'pre-check
|
(add-before 'check 'pre-check
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(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"
|
(string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
|
||||||
all)))))
|
all)))))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
||||||
(if tests?
|
(if tests?
|
||||||
(with-directory-excursion "tests"
|
(with-directory-excursion "tests"
|
||||||
;; Tests expect PYTHONPATH to contain the root directory.
|
;; Tests expect PYTHONPATH to contain the root directory.
|
||||||
(setenv "PYTHONPATH" "..")
|
(setenv "PYTHONPATH" "..")
|
||||||
(invoke "python" "runtests.py"
|
(apply invoke "python" "runtests.py" test-flags))
|
||||||
;; 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~%"))))
|
(format #t "test suite not run~%"))))
|
||||||
;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
|
;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
|
||||||
;; see <https://bugs.gnu.org/25235>. The django-admin script typically
|
;; see <https://bugs.gnu.org/25235>. The django-admin script typically
|
||||||
|
|
Loading…
Reference in a new issue