summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-05-12 22:56:01 +0200
committerGitHub <noreply@github.com>2020-05-12 13:56:01 -0700
commit11fa61665f2c921d6c9af82d9556e2985a2f3bd4 (patch)
treebc94815517c74ef1cd41d8b0751ca808dd3498b5 /share
parent6b41fb88a988cf35099ea5f5ecf7a3b42a5d7e1b (diff)
downloadspack-11fa61665f2c921d6c9af82d9556e2985a2f3bd4.tar.gz
spack-11fa61665f2c921d6c9af82d9556e2985a2f3bd4.tar.bz2
spack-11fa61665f2c921d6c9af82d9556e2985a2f3bd4.tar.xz
spack-11fa61665f2c921d6c9af82d9556e2985a2f3bd4.zip
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.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/run-shell-tests43
-rwxr-xr-xshare/spack/qa/run-unit-tests25
2 files changed, 43 insertions, 25 deletions
diff --git a/share/spack/qa/run-shell-tests b/share/spack/qa/run-shell-tests
new file mode 100755
index 0000000000..31c1c1548b
--- /dev/null
+++ b/share/spack/qa/run-shell-tests
@@ -0,0 +1,43 @@
+#!/bin/bash -e
+#
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+#
+# Description:
+# Runs Spack shell tests.
+#
+# Usage:
+# run-shell-tests
+
+#-----------------------------------------------------------
+# Run a few initial commands and set up test environment
+#-----------------------------------------------------------
+ORIGINAL_PATH="$PATH"
+
+. "$(dirname $0)/setup.sh"
+check_dependencies $coverage git hg svn
+
+# 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 [ "$COVERAGE" = true ]; then
+ "$QA_DIR/bashcov" "$QA_DIR/setup-env-test.sh" &> /dev/null
+ "$QA_DIR/bashcov" "$QA_DIR/completion-test.sh" &> /dev/null
+else
+ bash "$QA_DIR/setup-env-test.sh"
+ bash "$QA_DIR/completion-test.sh"
+fi
+
+# Run the test scripts for their output (these will print nicely)
+zsh "$QA_DIR/setup-env-test.sh"
+dash "$QA_DIR/setup-env-test.sh"
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 4bd04bcbb9..7c4abb1413 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -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"