bricks: convert to new stand-alone test process (#35694)
This commit is contained in:
		| @@ -3,6 +3,8 @@ | |||||||
| # | # | ||||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
| 
 | 
 | ||||||
|  | import os | ||||||
|  | 
 | ||||||
| from spack.package import * | from spack.package import * | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @@ -71,25 +73,17 @@ def copy_test_sources(self): | |||||||
|         ] |         ] | ||||||
|         self.cache_extra_test_sources(srcs) |         self.cache_extra_test_sources(srcs) | ||||||
| 
 | 
 | ||||||
|     def test(self): |     def test_bricklib_example(self): | ||||||
|         """Test bricklib package""" |         """build and run pre-built example""" | ||||||
|         # Test prebuilt binary |  | ||||||
|         source_dir = join_path(self.test_suite.current_test_cache_dir, "examples", "external") |         source_dir = join_path(self.test_suite.current_test_cache_dir, "examples", "external") | ||||||
|  |         if not os.path.exists(source_dir): | ||||||
|  |             raise SkipTest("{0} is missing".format(source_dir)) | ||||||
| 
 | 
 | ||||||
|         self.run_test( |         with working_dir(source_dir): | ||||||
|             exe="cmake", options=["."], purpose="Configure bricklib example", work_dir=source_dir |             cmake = which(self.spec["cmake"].prefix.bin.cmake) | ||||||
|         ) |             cmake(".") | ||||||
| 
 | 
 | ||||||
|         self.run_test( |             cmake("--build", ".") | ||||||
|             exe="cmake", |  | ||||||
|             options=["--build", "."], |  | ||||||
|             purpose="Build bricklib example", |  | ||||||
|             work_dir=source_dir, |  | ||||||
|         ) |  | ||||||
| 
 | 
 | ||||||
|         self.run_test( |             example = which("example") | ||||||
|             exe=join_path(source_dir, "example"), |             example() | ||||||
|             options=[], |  | ||||||
|             purpose="Execute bricklib example", |  | ||||||
|             work_dir=source_dir, |  | ||||||
|         ) |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tamara Dahlgren
					Tamara Dahlgren