summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richert <alexander.richert@noaa.gov>2024-08-02 02:24:54 -0700
committerGitHub <noreply@github.com>2024-08-02 11:24:54 +0200
commite5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3 (patch)
treedbf5207b210c4cef237d1a0530b57f105a40e216
parent9f795de60bccf0960fdf949772bf6e7c5194850a (diff)
downloadspack-e5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3.tar.gz
spack-e5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3.tar.bz2
spack-e5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3.tar.xz
spack-e5a8d7be49e6065795ccd4d23f2a4cdd15f1b4a3.zip
gfsio: add testing with pfunit (#45444)
-rw-r--r--var/spack/repos/builtin/packages/gfsio/package.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gfsio/package.py b/var/spack/repos/builtin/packages/gfsio/package.py
index f78b623269..1a9ff4d22e 100644
--- a/var/spack/repos/builtin/packages/gfsio/package.py
+++ b/var/spack/repos/builtin/packages/gfsio/package.py
@@ -21,7 +21,13 @@ class Gfsio(CMakePackage):
version("develop", branch="develop")
version("1.4.1", sha256="eab106302f520600decc4f9665d7c6a55e7b4901fab6d9ef40f29702b89b69b1")
- depends_on("fortran", type="build") # generated
+ depends_on("fortran", type="build")
+
+ depends_on("pfunit", type="test")
+
+ def cmake_args(self):
+ args = [self.define("ENABLE_TESTS", self.run_tests)]
+ return args
def setup_run_environment(self, env):
lib = find_libraries("libgfsio", root=self.prefix, shared=False, recursive=True)
@@ -35,3 +41,7 @@ class Gfsio(CMakePackage):
if name == "fflags":
flags.append("-Free")
return (None, None, flags)
+
+ def check(self):
+ with working_dir(self.builder.build_directory):
+ make("test")