summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2020-11-18 02:39:02 -0800
committerGitHub <noreply@github.com>2020-11-18 02:39:02 -0800
commit77b2e578ec47f7713cae965fede1ab6e60aa69c4 (patch)
treea03377956a08356bc3b73dc23b4d466c4f2f5aa6 /.github
parentb81bbfb6e9691036fc284f034e749a3b9361bf5a (diff)
downloadspack-77b2e578ec47f7713cae965fede1ab6e60aa69c4.tar.gz
spack-77b2e578ec47f7713cae965fede1ab6e60aa69c4.tar.bz2
spack-77b2e578ec47f7713cae965fede1ab6e60aa69c4.tar.xz
spack-77b2e578ec47f7713cae965fede1ab6e60aa69c4.zip
spack test (#15702)
Users can add test() methods to their packages to run smoke tests on installations with the new `spack test` command (the old `spack test` is now `spack unit-test`). spack test is environment-aware, so you can `spack install` an environment and then run `spack test run` to run smoke tests on all of its packages. Historical test logs can be perused with `spack test results`. Generic smoke tests for MPI implementations, C, C++, and Fortran compilers as well as specific smoke tests for 18 packages. Inside the test method, individual tests can be run separately (and continue to run best-effort after a test failure) using the `run_test` method. The `run_test` method encapsulates finding test executables, running and checking return codes, checking output, and error handling. This handles the following trickier aspects of testing with direct support in Spack's package API: - [x] Caching source or intermediate build files at build time for use at test time. - [x] Test dependencies, - [x] packages that require a compiler for testing (such as library only packages). See the packaging guide for more details on using Spack testing support. Included is support for package.py files for virtual packages. This does not change the Spack interface, but is a major change in internals. Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov> Co-authored-by: wspear <wjspear@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/linux_unit_tests.yaml2
-rw-r--r--.github/workflows/macos_unit_tests.yaml2
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/linux_unit_tests.yaml b/.github/workflows/linux_unit_tests.yaml
index c66d58c284..c87ea6e07a 100644
--- a/.github/workflows/linux_unit_tests.yaml
+++ b/.github/workflows/linux_unit_tests.yaml
@@ -132,7 +132,7 @@ jobs:
. share/spack/setup-env.sh
spack compiler find
spack solve mpileaks%gcc
- coverage run $(which spack) test -v
+ coverage run $(which spack) unit-test -v
coverage combine
coverage xml
- uses: codecov/codecov-action@v1
diff --git a/.github/workflows/macos_unit_tests.yaml b/.github/workflows/macos_unit_tests.yaml
index 2de92394f8..29caaa2e08 100644
--- a/.github/workflows/macos_unit_tests.yaml
+++ b/.github/workflows/macos_unit_tests.yaml
@@ -35,7 +35,7 @@ jobs:
git --version
. .github/workflows/setup_git.sh
. share/spack/setup-env.sh
- coverage run $(which spack) test
+ coverage run $(which spack) unit-test
coverage combine
coverage xml
- uses: codecov/codecov-action@v1