diff options
author | AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> | 2024-06-18 12:18:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 12:18:56 -0700 |
commit | 37e2d46d7dd947a06598f2a3bdc0121dc0697e6a (patch) | |
tree | 060ec2c235b2174c5e3f9060054795064c8b56cb | |
parent | a389eb5a082d7859728c35522ae049abc9af0fa3 (diff) | |
download | spack-37e2d46d7dd947a06598f2a3bdc0121dc0697e6a.tar.gz spack-37e2d46d7dd947a06598f2a3bdc0121dc0697e6a.tar.bz2 spack-37e2d46d7dd947a06598f2a3bdc0121dc0697e6a.tar.xz spack-37e2d46d7dd947a06598f2a3bdc0121dc0697e6a.zip |
Legion: Reformatted Old To New Test Method and skipping tests (#44733)
* Legion: reformatted old test method to match new test method
* Updated docstring and how cmake file is opened
-rw-r--r-- | var/spack/repos/builtin/packages/legion/package.py | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index f8d56c7384..80ad9e6a31 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -476,18 +476,15 @@ class Legion(CMakePackage, ROCmPackage): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources([join_path("examples", "local_function_tasks")]) - def run_local_function_tasks_test(self): - """Run stand alone test: local_function_tasks""" + def test_run_local_function_tasks(self): + """Build and run external application example""" test_dir = join_path( self.test_suite.current_test_cache_dir, "examples", "local_function_tasks" ) if not os.path.exists(test_dir): - print("Skipping local_function_tasks test") - return - - exe = "local_function_tasks" + raise SkipTest(f"{test_dir} must exist") cmake_args = [ f"-DCMAKE_C_COMPILER={self.compiler.cc}", @@ -495,16 +492,12 @@ class Legion(CMakePackage, ROCmPackage): f"-DLegion_DIR={join_path(self.prefix, 'share', 'Legion', 'cmake')}", ] - self.run_test( - "cmake", - options=cmake_args, - purpose=f"test: generate makefile for {exe} example", - work_dir=test_dir, - ) - - self.run_test("make", purpose=f"test: build {exe} example", work_dir=test_dir) + with working_dir(test_dir): + cmake = self.spec["cmake"].command + cmake(*cmake_args) - self.run_test(exe, purpose=f"test: run {exe} example", work_dir=test_dir) + make = which("make") + make() - def test(self): - self.run_local_function_tasks_test() + exe = which("local_function_tasks") + exe() |