diff options
-rw-r--r-- | var/spack/repos/builtin/packages/archer/package.py | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py index 4c53949f25..8492eebc96 100644 --- a/var/spack/repos/builtin/packages/archer/package.py +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - import os from spack.package import * @@ -50,25 +49,17 @@ class Archer(CMakePackage): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources(["test"]) - def run_parallel_example_test(self): - """Run stand alone test: parallel-simple""" - + def test_run_parallel_example(self): + """build and run parallel-simple""" test_dir = join_path(self.test_suite.current_test_cache_dir, "test", "parallel") - if not os.path.exists(test_dir): - print("Skipping archer test") - return - - exe = "parallel-simple" - - self.run_test( - "clang-archer", - options=["-o", exe, "{0}".format(join_path(test_dir, "parallel-simple.c"))], - purpose="test: compile {0} example".format(exe), - work_dir=test_dir, - ) + raise SkipTest("Parallel test directory does not exist") - self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir) + test_exe = "parallel-simple" + test_src = "{0}.c".format(test_exe) + with working_dir(test_dir): + clang = which("clang-archer") + clang("-o", test_exe, test_src) - def test(self): - self.run_parallel_example_test() + parallel_simple = which(test_exe) + parallel_simple() |