diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2022-02-20 14:02:31 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2022-02-20 14:02:31 +0200 |
| commit | 14a556c7ed1e643a4388ca54b68be2f4a89b2161 (patch) | |
| tree | c3c168a46dd079eb6545d80623e2458bce58527a /gnu/packages/python-web.scm | |
| parent | 781dd2de230e37e1dc05c992936125655fdf842f (diff) | |
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.
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 76d9a3e0c47..456323ca55e 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -268,27 +268,34 @@ for adding, removing and dropping callbacks.") | |||
| 268 | (find-files "." "_.*\\.pyx$"))))) | 268 | (find-files "." "_.*\\.pyx$"))))) |
| 269 | (replace 'check | 269 | (replace 'check |
| 270 | (lambda* (#:key tests? #:allow-other-keys) | 270 | (lambda* (#:key tests? #:allow-other-keys) |
| 271 | (when tests? | 271 | (let ((skipped-tests |
| 272 | ;; This tests requires the 'proxy.py' module, not yet | 272 | (string-append |
| 273 | ;; packaged. | 273 | ;; This test probably requires to be run with the |
| 274 | (delete-file "tests/test_proxy_functional.py") | 274 | ;; library loaded from the the build directory. |
| 275 | (invoke "pytest" "-vv" | 275 | "not test_c_parser_loaded and " |
| 276 | ;; Disable loading the aiohttp coverage plugin | 276 | ;; Disable the following tests as they require |
| 277 | ;; to avoid a circular dependency (code coverage | 277 | ;; networking. |
| 278 | ;; is not very interesting to us anyway). | 278 | "not TestDeflateBuffer and " |
| 279 | "-o" "addopts=''" "--ignore=aiohttp" | 279 | "not test_client_session_timeout_zero and " |
| 280 | "-n" (number->string (parallel-job-count)) | 280 | "not test_empty_body and " |
| 281 | "-k" (string-append | 281 | "not test_mark_formdata_as_processed[pyloop] and " |
| 282 | ;; This test probably requires to be run with the | 282 | "not test_receive_runtime_err[pyloop]"))) |
| 283 | ;; library loaded from the the build directory. | 283 | (when tests? |
| 284 | "not test_c_parser_loaded and " | 284 | ;; This tests requires the 'proxy.py' module, not yet |
| 285 | ;; Disable the following tests as they require | 285 | ;; packaged. |
| 286 | ;; networking. | 286 | (delete-file "tests/test_proxy_functional.py") |
| 287 | "not TestDeflateBuffer and " | 287 | ;; Sometimes tests fail when run in parallel. |
| 288 | "not test_client_session_timeout_zero and " | 288 | (or |
| 289 | "not test_empty_body and " | 289 | (invoke "pytest" "-vv" |
| 290 | "not test_mark_formdata_as_processed[pyloop] and " | 290 | ;; Disable loading the aiohttp coverage plugin |
| 291 | "not test_receive_runtime_err[pyloop]")))))))) | 291 | ;; to avoid a circular dependency (code coverage |
| 292 | ;; is not very interesting to us anyway). | ||
| 293 | "-o" "addopts=''" "--ignore=aiohttp" | ||
| 294 | "-n" (number->string (parallel-job-count)) | ||
| 295 | "-k" skipped-tests) | ||
| 296 | (invoke "pytest" "-vv" | ||
| 297 | "-o" "addopts=''" "--ignore=aiohttp" | ||
| 298 | "-k" skipped-tests))))))))) | ||
| 292 | (propagated-inputs | 299 | (propagated-inputs |
| 293 | (list python-aiodns | 300 | (list python-aiodns |
| 294 | python-aiosignal | 301 | python-aiosignal |
