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,27 +268,34 @@ 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. |                        ;; This test probably requires to be run with the | ||||||
|                (delete-file "tests/test_proxy_functional.py") |                        ;; library loaded from the the build directory. | ||||||
|                (invoke "pytest" "-vv" |                        "not test_c_parser_loaded and " | ||||||
|                        ;; Disable loading the aiohttp coverage plugin |                        ;; Disable the following tests as they require | ||||||
|                        ;; to avoid a circular dependency (code coverage |                        ;; networking. | ||||||
|                        ;; is not very interesting to us anyway). |                        "not TestDeflateBuffer and " | ||||||
|                        "-o" "addopts=''" "--ignore=aiohttp" |                        "not test_client_session_timeout_zero and " | ||||||
|                        "-n" (number->string (parallel-job-count)) |                        "not test_empty_body and " | ||||||
|                        "-k" (string-append |                        "not test_mark_formdata_as_processed[pyloop] and " | ||||||
|                              ;; This test probably requires to be run with the |                        "not test_receive_runtime_err[pyloop]"))) | ||||||
|                              ;; library loaded from the the build directory. |                (when tests? | ||||||
|                              "not test_c_parser_loaded and " |                  ;; This tests requires the 'proxy.py' module, not yet | ||||||
|                              ;; Disable the following tests as they require |                  ;; packaged. | ||||||
|                              ;; networking. |                  (delete-file "tests/test_proxy_functional.py") | ||||||
|                              "not TestDeflateBuffer and " |                  ;; Sometimes tests fail when run in parallel. | ||||||
|                              "not test_client_session_timeout_zero and " |                  (or | ||||||
|                              "not test_empty_body and " |                    (invoke "pytest" "-vv" | ||||||
|                              "not test_mark_formdata_as_processed[pyloop] and " |                            ;; Disable loading the aiohttp coverage plugin | ||||||
|                              "not test_receive_runtime_err[pyloop]")))))))) |                            ;; 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