summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2023-06-06 06:08:51 -0700
committerGitHub <noreply@github.com>2023-06-06 15:08:51 +0200
commit6937d9dddc5da87ffdc6dd738bcf1ca806256781 (patch)
treea52fd06d9ec318a58e55d1c6c8d507356fce6e40 /var
parent4c2531d5fbc2022dd144d1c59dd6faa7ce2c9607 (diff)
downloadspack-6937d9dddc5da87ffdc6dd738bcf1ca806256781.tar.gz
spack-6937d9dddc5da87ffdc6dd738bcf1ca806256781.tar.bz2
spack-6937d9dddc5da87ffdc6dd738bcf1ca806256781.tar.xz
spack-6937d9dddc5da87ffdc6dd738bcf1ca806256781.zip
eigenexa: convert to new stand-alone test process (#35745)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/eigenexa/package.py35
1 files changed, 16 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/eigenexa/package.py b/var/spack/repos/builtin/packages/eigenexa/package.py
index 1e5fdb56c7..3d994bbbcd 100644
--- a/var/spack/repos/builtin/packages/eigenexa/package.py
+++ b/var/spack/repos/builtin/packages/eigenexa/package.py
@@ -52,8 +52,8 @@ class Eigenexa(AutotoolsPackage):
"""Save off benchmark files for stand-alone tests."""
self.cache_extra_test_sources("benchmark")
- def test(self):
- """Perform stand-alone/smoke tests using pre-built benchmarks."""
+ def test_benchmarks(self):
+ """run benchmark checks"""
# NOTE: This package would ideally build the test program using
# the installed software *each* time the tests are run since
# this package installs a library.
@@ -61,20 +61,17 @@ class Eigenexa(AutotoolsPackage):
test_cache_dir = join_path(self.test_suite.current_test_cache_dir, "benchmark")
test_data_dir = self.test_suite.current_test_data_dir
- opts = [
- "run-test.sh",
- self.spec["mpi"].prefix.bin.mpirun,
- "-n",
- "1",
- join_path(test_cache_dir, "eigenexa_benchmark"),
- "-f",
- join_path(test_cache_dir, "IN"),
- ]
- env["OMP_NUM_THREADS"] = "1"
- self.run_test(
- "sh",
- options=opts,
- expected="EigenExa Test Passed !",
- purpose="test: running benchmark checks",
- work_dir=test_data_dir,
- )
+ with working_dir(test_data_dir):
+ opts = [
+ "run-test.sh",
+ self.spec["mpi"].prefix.bin.mpirun,
+ "-n",
+ "1",
+ join_path(test_cache_dir, "eigenexa_benchmark"),
+ "-f",
+ join_path(test_cache_dir, "IN"),
+ ]
+ env["OMP_NUM_THREADS"] = "1"
+ sh = which("sh")
+ out = sh(*opts, output=str.split, error=str.split)
+ assert "EigenExa Test Passed !" in out