Skip to content

Commit 5967889

Browse files
Merge pull request #526 from AlexanderRichert-NOAA/nc_test_fix
netcdf-{c,fortran}: run tests on run_tests, not run_after(install)
2 parents a4efcdf + c6bbe65 commit 5967889

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

var/spack/repos/builtin/packages/netcdf-c/package.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,11 @@ def configure_args(self):
561561

562562
# It looks like the issues with running the tests in parallel were fixed around version 4.6.0
563563
# (see https://github.com/Unidata/netcdf-c/commit/812c2fd4d108cca927582c0d84049c0f271bb9e0):
564-
@when("@:4.5.0")
565564
@run_after("install")
566-
def check(self):
565+
def run_checks(self):
567566
# h5_test fails when run in parallel
568-
make("check", parallel=False)
567+
if self.pkg.run_tests:
568+
make("check", parallel=self.spec.satisfies("@4.6:"))
569+
570+
def check(self):
571+
pass

var/spack/repos/builtin/packages/netcdf-fortran/package.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,13 @@ def configure_args(self):
158158
return config_args
159159

160160
@run_after("install")
161-
def check(self):
161+
@on_package_attributes(run_tests=True)
162+
def run_checks(self):
162163
make("check", parallel=self.spec.satisfies("@4.5:"))
163164

165+
def check(self):
166+
pass
167+
164168
@run_after("install")
165169
def cray_module_filenames(self):
166170
# Cray compiler searches for module files with uppercase names by

0 commit comments

Comments
 (0)