diff options
author | Alex Richert <alexander.richert@noaa.gov> | 2024-08-02 02:20:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 11:20:44 +0200 |
commit | 2e85c8330117d7aa1897737e66ebe0d0c988b301 (patch) | |
tree | d9f6e0055adf1ef3dc206deacf81a17b39353a77 /var | |
parent | 251190a0c4c4ae1172c94359a17a36b86721642f (diff) | |
download | spack-2e85c8330117d7aa1897737e66ebe0d0c988b301.tar.gz spack-2e85c8330117d7aa1897737e66ebe0d0c988b301.tar.bz2 spack-2e85c8330117d7aa1897737e66ebe0d0c988b301.tar.xz spack-2e85c8330117d7aa1897737e66ebe0d0c988b301.zip |
sfcio: add unit testing with pfunit (#45453)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/sfcio/package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/sfcio/package.py b/var/spack/repos/builtin/packages/sfcio/package.py index fc0141a966..bec48d809b 100644 --- a/var/spack/repos/builtin/packages/sfcio/package.py +++ b/var/spack/repos/builtin/packages/sfcio/package.py @@ -21,7 +21,13 @@ class Sfcio(CMakePackage): version("develop", branch="develop") version("1.4.1", sha256="d9f900cf18ec1a839b4128c069b1336317ffc682086283443354896746b89c59") - 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("libsfcio", root=self.prefix, shared=False, recursive=True) @@ -35,3 +41,7 @@ class Sfcio(CMakePackage): if name == "fflags": flags.append("-Free") return (None, None, flags) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") |