diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 879b2f4e3e0..5b7e39b372a 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,7 +52,13 @@ jobs: # Needed for unit tests sudo apt-get -y install \ coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \ - cmake bison libbison-dev kcov + cmake bison libbison-dev subversion + # On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9 + - name: Install kcov with brew + run: "brew install kcov" - name: Install Python packages run: | pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov @@ -99,7 +105,13 @@ jobs: run: | sudo apt-get -y update # Needed for shell tests - sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash + sudo apt-get install -y coreutils csh zsh tcsh fish dash bash subversion + # On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9 + - name: Install kcov with brew + run: "brew install kcov" - name: Install Python packages run: | pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist diff --git a/share/spack/qa/run-shell-tests b/share/spack/qa/run-shell-tests index d7debc9f34f..a0e614056a3 100755 --- a/share/spack/qa/run-shell-tests +++ b/share/spack/qa/run-shell-tests @@ -36,7 +36,7 @@ export QA_DIR=$(realpath $QA_DIR) cd "$SPACK_ROOT" # Run bash tests with coverage enabled, but pipe output to /dev/null -# because it seems that kcov seems to undo the script's redirection +# because it seems that kcov undoes the script's redirection if [ "$COVERAGE" = true ]; then kcov "$SPACK_ROOT/coverage" "$QA_DIR/setup-env-test.sh" &> /dev/null kcov "$SPACK_ROOT/coverage" "$QA_DIR/completion-test.sh" &> /dev/null