travis: use bionic as default for Linux (#16521)

Modifications:

- [x] Travis now uses `bionic` as a default (`xenial` used for Python 3.5, `trusty` for Python 2.6)
- [x] Shell unit tests have been factored into their own run
- [x] `kcov` is built only for tests that upload coverage results

Overall with this we shave 3-4 mins. on each run and add an additional run of about 3 min. For some reason `kcov` 38 fails forwarding output when used with Python unit tests, so I used v34 for that and v38 (latest) for shell testing. Previously we were using v25.
This commit is contained in:
Massimiliano Culpo
2020-05-12 22:56:01 +02:00
committed by GitHub
parent 6b41fb88a9
commit 11fa61665f
3 changed files with 66 additions and 42 deletions

View File

@@ -47,28 +47,3 @@ fi
# Run unit tests with code coverage
#-----------------------------------------------------------
$coverage_run $(which spack) test -x --verbose
#-----------------------------------------------------------
# Run tests for setup-env.sh
#-----------------------------------------------------------
# Clean the environment by removing Spack from the path and getting rid of
# the spack shell function
export PATH="$ORIGINAL_PATH"
unset spack
# start in the spack root directory
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
if [ "$BASH_COVERAGE" = true ]; then
"$QA_DIR/bashcov" "$QA_DIR/setup-env-test.sh" &> /dev/null
"$QA_DIR/bashcov" "$QA_DIR/completion-test.sh" &> /dev/null
fi
# run the test scripts for their output (these will print nicely)
bash "$QA_DIR/setup-env-test.sh"
zsh "$QA_DIR/setup-env-test.sh"
dash "$QA_DIR/setup-env-test.sh"
bash "$QA_DIR/completion-test.sh"