ci: restore coverage computation (#32585)
* ci: restore coverage computation * Mark "test_foreground_background" as xfail * Mark "test_foreground_background_output" as xfail * Make number of processes explicit, remove verbosity on linux * Run coverage on just 3 Python jobs for linux * Run coverage on just 3 Python jobs for linux * Run coverage on just 2 Python jobs for linux * Add back verbose, since before we didn't encounter the xdist internal error * Reduce the workers to 2 * Try to use command line
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							b4a2b8d46c
						
					
				
				
					commit
					1427ddaa59
				
			| @@ -56,13 +56,25 @@ if python -m pytest --trace-config 2>&1 | grep xdist; then | ||||
|   export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'" | ||||
| fi | ||||
|  | ||||
| $coverage_run $(which spack) unit-test -x --verbose | ||||
| # We are running pytest-cov after the addition of pytest-xdist, since it integrates | ||||
| # other pugins for pytest automatically. We still need to use "coverage" explicitly | ||||
| # for the commands above. | ||||
| # | ||||
| # There is a need to pass the configuration file explicitly due to a bug: | ||||
| # https://github.com/pytest-dev/pytest-cov/issues/243 | ||||
| # https://github.com/pytest-dev/pytest-cov/issues/237 | ||||
| # where it seems that otherwise the configuration file might not be located by subprocesses | ||||
| # in some, not better specified, cases. | ||||
| if [[ "$UNIT_TEST_COVERAGE" == "true" ]]; then | ||||
|   $(which spack) unit-test -x --verbose --cov --cov-config=pyproject.toml | ||||
| else | ||||
|   $(which spack) unit-test -x --verbose | ||||
| fi | ||||
|  | ||||
|  | ||||
|  | ||||
| bash "$QA_DIR/test-env-cfg.sh" | ||||
|  | ||||
| # Delete the symlink going from ./lib/spack/docs/_spack_root back to | ||||
| # the initial directory, since it causes ELOOP errors with codecov/actions@2 | ||||
| if [[ "$COVERAGE" == "true" ]]; then | ||||
|   rm lib/spack/docs/_spack_root | ||||
| fi | ||||
|  | ||||
| rm lib/spack/docs/_spack_root | ||||
|   | ||||
		Reference in New Issue
	
	Block a user