From e944734ef9afa1ac9b46579934482b7d909ed24e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 27 Oct 2022 20:31:38 +0200 Subject: build-system/pyproject: Always run tests verbosely for supported backends. * guix/build-system/pyproject.scm (pyproject-build): Default to '() instead of #false for TEST-FLAGS. * guix/build/pyproject-build-system.scm (check): Unconditionally enable verbose test flags. * doc/guix.texi (Build Systems): Document this change. * gnu/packages/fontutils.scm (python-glyphslib)[arguments]: Remove verbosity from #:test-flags. * gnu/packages/pdf.scm (python-pydyf, weasyprint)[arguments]: Likewise. * gnu/packages/python-web.scm (python-openapi-spec-validator)[arguments]: Likewise. * gnu/packages/python-xyz.scm (python-path, python-tempora)[arguments]: Likewise. --- guix/build-system/pyproject.scm | 2 +- guix/build/pyproject-build-system.scm | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'guix') diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm index 1e365d4f21..8f3b562ca3 100644 --- a/guix/build-system/pyproject.scm +++ b/guix/build-system/pyproject.scm @@ -95,7 +95,7 @@ (configure-flags ''()) (build-backend #f) (test-backend #f) - (test-flags #f) + (test-flags ''()) (phases '%standard-phases) (outputs '("out" "wheel")) (search-paths '()) diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm index b969dd0379..c69ccc9d64 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -158,14 +158,16 @@ builder.build_wheel(sys.argv[2], config_settings=config_settings)" (format #t "Using ~a~%" use-test-backend) (match use-test-backend ('pytest - (apply invoke (cons pytest (or test-flags '("-vv"))))) + (apply invoke pytest "-vv" test-flags)) ('nose - (apply invoke (cons nosetests (or test-flags '("-v"))))) + (apply invoke nosetests "-v" test-flags)) ('nose2 - (apply invoke (cons nose2 (or test-flags '("-v" "--pretty-assert"))))) + (apply invoke nose2 "-v" "--pretty-assert" test-flags)) ('setup.py - (apply invoke (append '("python" "setup.py") - (or test-flags '("test" "-v"))))) + (apply invoke "python" "setup.py" + (if (null? test-flags) + '("test" "-v") + test-flags))) ;; The developer should explicitly disable tests in this case. (else (raise (condition (&test-system-not-found)))))) (format #t "test suite not run~%"))) -- cgit v1.2.3