summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAlex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>2023-09-13 18:14:07 -0400
committerGitHub <noreply@github.com>2023-09-13 15:14:07 -0700
commita0622a2ee0c599129f3cdaa20773a00fb47f8853 (patch)
tree39cb561de72551054f929c21314e578f3f08b781 /var
parenta25a910ba090fed8fb73efa1c6eae6d944909ef3 (diff)
downloadspack-a0622a2ee0c599129f3cdaa20773a00fb47f8853.tar.gz
spack-a0622a2ee0c599129f3cdaa20773a00fb47f8853.tar.bz2
spack-a0622a2ee0c599129f3cdaa20773a00fb47f8853.tar.xz
spack-a0622a2ee0c599129f3cdaa20773a00fb47f8853.zip
Add check() to sp recipe (#40005)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/sp/package.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/sp/package.py b/var/spack/repos/builtin/packages/sp/package.py
index 2de4ddffb1..7503377f02 100644
--- a/var/spack/repos/builtin/packages/sp/package.py
+++ b/var/spack/repos/builtin/packages/sp/package.py
@@ -15,7 +15,7 @@ class Sp(CMakePackage):
url = "https://github.com/NOAA-EMC/NCEPLIBS-sp/archive/refs/tags/v2.3.3.tar.gz"
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("2.4.0", sha256="dbb4280e622d2683b68a28f8e3837744adf9bbbb1e7940856e8f4597f481c708")
@@ -26,8 +26,8 @@ class Sp(CMakePackage):
variant("pic", default=False, description="Enable position-independent code (PIC)")
variant(
"precision",
- default=["4", "d"],
- values=["4", "d", "8"],
+ default=("4", "d"),
+ values=("4", "d", "8"),
multi=True,
description="Library versions: 4=4-byte reals, d=8-byte reals, 8=8-byte ints and reals",
when="@2.4:",
@@ -37,7 +37,7 @@ class Sp(CMakePackage):
if self.spec.satisfies("@2.4:"):
suffixes = self.spec.variants["precision"].value
else:
- suffixes = ["4", "d", "8"]
+ suffixes = ("4", "d", "8")
for suffix in suffixes:
lib = find_libraries(
@@ -58,4 +58,10 @@ class Sp(CMakePackage):
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_DEPRECATED", False))
+ if self.spec.satisfies("@2.4:"):
+ args.append(self.define("BUILD_TESTING", self.run_tests))
return args
+
+ def check(self):
+ with working_dir(self.builder.build_directory):
+ make("test")