spack/share/spack/qa/run-unit-tests
Todd Gamblin bb5a433a46 Separate integration tests; simplify test scripts (#4006)
* Separate build integration tests; simplify test scripts

- Move build tests out of the regular Travis unit tests, add more smoke
  test packages to build.

- Run all test scripts with bash -e, which fails on error.

- Factor coverage out into a Travis environment variable, so it's more
  obvious from .travis.yml which tests contribute to coverage and which
  don't.

- Factor dependency checking and much of the front-matter in tests
  scripts into a setup.sh script, which is sourced by all the test
  scripts.  Extra cruft in each tests script now reduced to 2 lines at
  the beginning.
2017-04-27 11:47:56 -07:00

26 lines
505 B
Bash
Executable File

#!/bin/bash -e
#
# Description:
# Runs Spack unit tests.
#
# Usage:
# run-unit-tests [test ...]
#
# Options:
# Optionally add one or more unit tests
# to only run these tests.
#
. "$(dirname $0)/setup.sh"
check_dependencies ${coverage} git hg svn
# Move to root directory of Spack
# Allows script to be run from anywhere
cd "$SPACK_ROOT"
# Print compiler information
spack config get compilers
# Run unit tests with code coverage
${coverage_run} bin/spack test "$@"
${coverage_combine}