2017-04-28 02:47:56 +08:00
|
|
|
#!/bin/bash -e
|
2016-07-31 00:10:33 +08:00
|
|
|
#
|
2016-08-23 07:40:53 +08:00
|
|
|
# Description:
|
|
|
|
# Runs Spack unit tests.
|
2016-07-31 00:10:33 +08:00
|
|
|
#
|
2016-08-23 07:40:53 +08:00
|
|
|
# Usage:
|
|
|
|
# run-unit-tests [test ...]
|
2016-07-31 00:10:33 +08:00
|
|
|
#
|
2016-08-23 07:40:53 +08:00
|
|
|
# Options:
|
|
|
|
# Optionally add one or more unit tests
|
|
|
|
# to only run these tests.
|
2016-07-31 00:10:33 +08:00
|
|
|
#
|
2017-04-28 02:47:56 +08:00
|
|
|
. "$(dirname $0)/setup.sh"
|
|
|
|
check_dependencies ${coverage} git hg svn
|
2016-08-23 07:40:53 +08:00
|
|
|
|
2016-08-24 00:13:02 +08:00
|
|
|
# Move to root directory of Spack
|
|
|
|
# Allows script to be run from anywhere
|
|
|
|
cd "$SPACK_ROOT"
|
|
|
|
|
2017-04-28 02:47:56 +08:00
|
|
|
# Print compiler information
|
2016-07-31 00:10:33 +08:00
|
|
|
spack config get compilers
|
|
|
|
|
2017-05-02 05:32:33 +08:00
|
|
|
# Profile and print top 20 lines for a simple call to spack spec
|
|
|
|
${coverage_run} bin/spack -p --lines 20 spec mpileaks
|
|
|
|
|
2016-07-31 00:10:33 +08:00
|
|
|
# Run unit tests with code coverage
|
2017-04-28 02:47:56 +08:00
|
|
|
${coverage_run} bin/spack test "$@"
|
|
|
|
${coverage_combine}
|