diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2023-05-28 00:41:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 09:41:38 +0200 |
commit | ab3ffd93615161c0db1792a069f4c18583086079 (patch) | |
tree | e66fc7265a23757ca28964314ff6025fbfbe67cb | |
parent | 3b9454a5cc87b61296621aa4c87178d5fc61da3a (diff) | |
download | spack-ab3ffd93615161c0db1792a069f4c18583086079.tar.gz spack-ab3ffd93615161c0db1792a069f4c18583086079.tar.bz2 spack-ab3ffd93615161c0db1792a069f4c18583086079.tar.xz spack-ab3ffd93615161c0db1792a069f4c18583086079.zip |
archer: convert to new stand-alone test process (#35697)
-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() |