gnu: python-aiohttp: Fallback to running tests sequentially.
* gnu/packages/python-web.scm (python-aiohttp)[arguments]: Adjust custom 'check phase to run the tests sequentially if they fail when run in parallel.
This commit is contained in:
parent
781dd2de23
commit
14a556c7ed
1 changed files with 28 additions and 21 deletions
|
@ -268,17 +268,8 @@ for adding, removing and dropping callbacks.")
|
||||||
(find-files "." "_.*\\.pyx$")))))
|
(find-files "." "_.*\\.pyx$")))))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(when tests?
|
(let ((skipped-tests
|
||||||
;; This tests requires the 'proxy.py' module, not yet
|
(string-append
|
||||||
;; packaged.
|
|
||||||
(delete-file "tests/test_proxy_functional.py")
|
|
||||||
(invoke "pytest" "-vv"
|
|
||||||
;; Disable loading the aiohttp coverage plugin
|
|
||||||
;; to avoid a circular dependency (code coverage
|
|
||||||
;; is not very interesting to us anyway).
|
|
||||||
"-o" "addopts=''" "--ignore=aiohttp"
|
|
||||||
"-n" (number->string (parallel-job-count))
|
|
||||||
"-k" (string-append
|
|
||||||
;; This test probably requires to be run with the
|
;; This test probably requires to be run with the
|
||||||
;; library loaded from the the build directory.
|
;; library loaded from the the build directory.
|
||||||
"not test_c_parser_loaded and "
|
"not test_c_parser_loaded and "
|
||||||
|
@ -288,7 +279,23 @@ for adding, removing and dropping callbacks.")
|
||||||
"not test_client_session_timeout_zero and "
|
"not test_client_session_timeout_zero and "
|
||||||
"not test_empty_body and "
|
"not test_empty_body and "
|
||||||
"not test_mark_formdata_as_processed[pyloop] and "
|
"not test_mark_formdata_as_processed[pyloop] and "
|
||||||
"not test_receive_runtime_err[pyloop]"))))))))
|
"not test_receive_runtime_err[pyloop]")))
|
||||||
|
(when tests?
|
||||||
|
;; This tests requires the 'proxy.py' module, not yet
|
||||||
|
;; packaged.
|
||||||
|
(delete-file "tests/test_proxy_functional.py")
|
||||||
|
;; Sometimes tests fail when run in parallel.
|
||||||
|
(or
|
||||||
|
(invoke "pytest" "-vv"
|
||||||
|
;; Disable loading the aiohttp coverage plugin
|
||||||
|
;; to avoid a circular dependency (code coverage
|
||||||
|
;; is not very interesting to us anyway).
|
||||||
|
"-o" "addopts=''" "--ignore=aiohttp"
|
||||||
|
"-n" (number->string (parallel-job-count))
|
||||||
|
"-k" skipped-tests)
|
||||||
|
(invoke "pytest" "-vv"
|
||||||
|
"-o" "addopts=''" "--ignore=aiohttp"
|
||||||
|
"-k" skipped-tests)))))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-aiodns
|
(list python-aiodns
|
||||||
python-aiosignal
|
python-aiosignal
|
||||||
|
|
Reference in a new issue