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
This commit is contained in:
		| @@ -476,18 +476,15 @@ def cache_test_sources(self): | ||||
|         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 @@ def run_local_function_tasks_test(self): | ||||
|             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, | ||||
|         ) | ||||
|         with working_dir(test_dir): | ||||
|             cmake = self.spec["cmake"].command | ||||
|             cmake(*cmake_args) | ||||
| 
 | ||||
|         self.run_test("make", purpose=f"test: build {exe} example", work_dir=test_dir) | ||||
|             make = which("make") | ||||
|             make() | ||||
| 
 | ||||
|         self.run_test(exe, purpose=f"test: run {exe} example", work_dir=test_dir) | ||||
| 
 | ||||
|     def test(self): | ||||
|         self.run_local_function_tasks_test() | ||||
|             exe = which("local_function_tasks") | ||||
|             exe() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 AcriusWinter
					AcriusWinter