me
/
guix
Archived
1
0
Fork 0

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.
Marius Bakke 2022-10-27 20:31:38 +02:00
parent 6ef998d54e
commit e944734ef9
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
7 changed files with 17 additions and 15 deletions

View File

@ -9332,8 +9332,9 @@ to guess the appropriate backend based on @file{pyproject.toml}.
@code{#:test-backend} is added. It defaults to @code{#false} and will guess
an appropriate test backend based on what is available in package inputs.
@item
@code{#:test-flags} is added. The default is @code{#false}, and varies based
on the detected @code{#:test-backend}.
@code{#:test-flags} is added. The default is @code{'()}. These flags are
passed as arguments to the test command. Note that flags for verbose output
is always enabled on supported backends.
@end itemize
It is considered ``experimental'' in that the implementation details are

View File

@ -598,8 +598,7 @@ process. FontParts is the successor of RoboFab.")
(build-system pyproject-build-system)
(arguments
(list
#:test-flags #~'("-vv"
;; These fail because the test data has not yet been
#:test-flags #~'(;; These fail because the test data has not yet been
;; updated for newer FontTools:
;; https://github.com/googlefonts/glyphsLib/issues/787
;; Re-enable for versions > 6.0.7.

View File

@ -739,7 +739,7 @@ extracting content or merging files.")
(build-system pyproject-build-system)
(arguments
(list
#:test-flags #~'("-vv" "-c" "/dev/null")))
#:test-flags #~'("-c" "/dev/null")))
(propagated-inputs (list python-pillow))
(native-inputs
(list ghostscript
@ -1500,7 +1500,7 @@ manipulating PDF documents from the command line. It supports
(build-system pyproject-build-system)
(arguments
(list
#:test-flags #~(list "-vv" "-c" "/dev/null"
#:test-flags #~(list "-c" "/dev/null"
"-n" (number->string (parallel-job-count)))
#:phases
#~(modify-phases %standard-phases

View File

@ -1648,7 +1648,7 @@ JSON Schema Specification Draft 2020-12.
(list
;; The example tests attempt to fetch resources from the Internet
;; (see: https://github.com/p1c2u/openapi-spec-validator/issues/151).
#:test-flags #~'("-vv" "-k" "not Example and not Exampe")
#:test-flags #~'("-k" "not Example and not Exampe")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'remove-coverage-pytest-options

View File

@ -12753,7 +12753,7 @@ invoked on those path objects directly.")
((#:tests? _ #f)
(not (%current-target-system)))
((#:test-flags flags #~'())
#~(append (list "-vv" "-k"
#~(append (list "-k"
(string-append
;; Do not test the myproject.toml build as it tries
;; to pull dependencies from the Internet.
@ -21366,7 +21366,7 @@ particularly convenient for use in tests.")
(arguments
;; Do not test the myproject.toml build as it tries to pull
;; dependencies from the Internet.
(list #:test-flags #~'("-vv" "-k" "not project")))
(list #:test-flags #~'("-k" "not project")))
(native-inputs
(list python-freezegun
python-pytest

View File

@ -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 '())

View File

@ -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~%")))