Add check() to sp recipe (#40005)
This commit is contained in:
		| @@ -15,7 +15,7 @@ class Sp(CMakePackage): | |||||||
|     url = "https://github.com/NOAA-EMC/NCEPLIBS-sp/archive/refs/tags/v2.3.3.tar.gz" |     url = "https://github.com/NOAA-EMC/NCEPLIBS-sp/archive/refs/tags/v2.3.3.tar.gz" | ||||||
|     git = "https://github.com/NOAA-EMC/NCEPLIBS-sp" |     git = "https://github.com/NOAA-EMC/NCEPLIBS-sp" | ||||||
| 
 | 
 | ||||||
|     maintainers("t-brown", "AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA") |     maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA") | ||||||
| 
 | 
 | ||||||
|     version("develop", branch="develop") |     version("develop", branch="develop") | ||||||
|     version("2.4.0", sha256="dbb4280e622d2683b68a28f8e3837744adf9bbbb1e7940856e8f4597f481c708") |     version("2.4.0", sha256="dbb4280e622d2683b68a28f8e3837744adf9bbbb1e7940856e8f4597f481c708") | ||||||
| @@ -26,8 +26,8 @@ class Sp(CMakePackage): | |||||||
|     variant("pic", default=False, description="Enable position-independent code (PIC)") |     variant("pic", default=False, description="Enable position-independent code (PIC)") | ||||||
|     variant( |     variant( | ||||||
|         "precision", |         "precision", | ||||||
|         default=["4", "d"], |         default=("4", "d"), | ||||||
|         values=["4", "d", "8"], |         values=("4", "d", "8"), | ||||||
|         multi=True, |         multi=True, | ||||||
|         description="Library versions: 4=4-byte reals, d=8-byte reals, 8=8-byte ints and reals", |         description="Library versions: 4=4-byte reals, d=8-byte reals, 8=8-byte ints and reals", | ||||||
|         when="@2.4:", |         when="@2.4:", | ||||||
| @@ -37,7 +37,7 @@ def setup_run_environment(self, env): | |||||||
|         if self.spec.satisfies("@2.4:"): |         if self.spec.satisfies("@2.4:"): | ||||||
|             suffixes = self.spec.variants["precision"].value |             suffixes = self.spec.variants["precision"].value | ||||||
|         else: |         else: | ||||||
|             suffixes = ["4", "d", "8"] |             suffixes = ("4", "d", "8") | ||||||
| 
 | 
 | ||||||
|         for suffix in suffixes: |         for suffix in suffixes: | ||||||
|             lib = find_libraries( |             lib = find_libraries( | ||||||
| @@ -58,4 +58,10 @@ def cmake_args(self): | |||||||
|         args.append(self.define("BUILD_D", self.spec.satisfies("precision=d"))) |         args.append(self.define("BUILD_D", self.spec.satisfies("precision=d"))) | ||||||
|         args.append(self.define("BUILD_8", self.spec.satisfies("precision=8"))) |         args.append(self.define("BUILD_8", self.spec.satisfies("precision=8"))) | ||||||
|         args.append(self.define("BUILD_DEPRECATED", False)) |         args.append(self.define("BUILD_DEPRECATED", False)) | ||||||
|  |         if self.spec.satisfies("@2.4:"): | ||||||
|  |             args.append(self.define("BUILD_TESTING", self.run_tests)) | ||||||
|         return args |         return args | ||||||
|  | 
 | ||||||
|  |     def check(self): | ||||||
|  |         with working_dir(self.builder.build_directory): | ||||||
|  |             make("test") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Alex Richert
					Alex Richert