superlu-dist: convert to new stand-alone test process (#38188)

This commit is contained in:
Tamara Dahlgren 2023-06-27 07:44:16 -07:00 committed by GitHub
parent 7470d14b35
commit 97972d300a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,26 +161,17 @@ def cache_test_sources(self):
install test subdirectory for use during `spack test run`.""" install test subdirectory for use during `spack test run`."""
self.cache_extra_test_sources([self.examples_src_dir]) self.cache_extra_test_sources([self.examples_src_dir])
def test(self): def test_pddrive(self):
test_dir = join_path(self.install_test_root, self.examples_src_dir) """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") 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 # Smoke test input parameters: -r 2 -c 2 g20.rua
test_args = ["-n", "4", superludriver, "-r", "2", "-c", "2", "g20.rua"] test_args = ["-n", "4", superludriver, "-r", "2", "-c", "2", "g20.rua"]
# Find the correct mpirun command # Find the correct mpirun command
mpiexe_f = which("srun", "mpirun", "mpiexec") mpiexe_f = which("srun", "mpirun", "mpiexec")
if mpiexe_f: mpiexe_f(*test_args)
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",
)