From 596d463714d46929f81db62b171c5a772679bb12 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 10 Jan 2018 17:14:17 +0100 Subject: [PATCH] Travis: use --concurrency=multiprocessing only on build tests (#6872) On a local workstation, it seems that tracking multiple processes during coverage may result in malformed coverage reports for unit tests and not for build tests. Given that multiple processes make a difference in coverage mainly for build tests, try to disable the tracking for unit tests to see if we get more stable coverage results. --- .coveragerc | 1 - share/spack/qa/setup.sh | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.coveragerc b/.coveragerc index 0201a4b502..224c472fa2 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,7 +2,6 @@ # .coveragerc to control coverage.py [run] parallel = True -concurrency = multiprocessing branch = True source = lib omit = diff --git a/share/spack/qa/setup.sh b/share/spack/qa/setup.sh index 98c79a0457..4b3f98e330 100755 --- a/share/spack/qa/setup.sh +++ b/share/spack/qa/setup.sh @@ -11,10 +11,14 @@ SPACK_ROOT="$QA_DIR/../../.." . "$SPACK_ROOT/share/spack/setup-env.sh" # Set up some variables for running coverage tests. -if [[ "$COVERAGE" == true ]]; then +if [[ "$COVERAGE" == "true" && "$TEST_SUITE" == "unit" ]]; then coverage=coverage coverage_run="coverage run" coverage_combine="coverage combine" +elif [[ "$COVERAGE" == "true" && "$TEST_SUITE" == "build" ]]; then + coverage=coverage + coverage_run="coverage run --concurrency=multiprocessing" + coverage_combine="coverage combine" else coverage="" coverage_run=""