diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2023-06-27 07:44:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 10:44:16 -0400 |
commit | 97972d300a81d424cfb9c5cf3f7b0933cc15f7dc (patch) | |
tree | 5041663fecf607ff86b5dbecc3e3b90b344358ef | |
parent | 7470d14b350eb74336b35bfc5a9b8a1bccaea826 (diff) | |
download | spack-97972d300a81d424cfb9c5cf3f7b0933cc15f7dc.tar.gz spack-97972d300a81d424cfb9c5cf3f7b0933cc15f7dc.tar.bz2 spack-97972d300a81d424cfb9c5cf3f7b0933cc15f7dc.tar.xz spack-97972d300a81d424cfb9c5cf3f7b0933cc15f7dc.zip |
superlu-dist: convert to new stand-alone test process (#38188)
-rw-r--r-- | var/spack/repos/builtin/packages/superlu-dist/package.py | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index b535c5fd12..7af5736993 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -161,26 +161,17 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources([self.examples_src_dir]) - def test(self): - test_dir = join_path(self.install_test_root, self.examples_src_dir) + def test_pddrive(self): + """run cached pddrive""" + if not self.spec.satisfies("@7.2.0:"): + raise SkipTest("Test is only available for v7.2.0 on") + + test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) superludriver = join_path(self.prefix.lib, "EXAMPLE", "pddrive") - with working_dir(test_dir, create=False): + + with working_dir(test_dir): # Smoke test input parameters: -r 2 -c 2 g20.rua test_args = ["-n", "4", superludriver, "-r", "2", "-c", "2", "g20.rua"] # Find the correct mpirun command mpiexe_f = which("srun", "mpirun", "mpiexec") - if mpiexe_f: - if self.spec.satisfies("@7.2.0:"): - self.run_test( - mpiexe_f.command, - test_args, - work_dir=".", - purpose="superlu-dist smoke test", - ) - else: - self.run_test( - "echo", - options=["skip test"], - work_dir=".", - purpose="superlu-dist smoke test", - ) + mpiexe_f(*test_args) |