summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/eckit/package.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py
index 761e009861..4062a234f4 100644
--- a/var/spack/repos/builtin/packages/eckit/package.py
+++ b/var/spack/repos/builtin/packages/eckit/package.py
@@ -88,7 +88,7 @@ class Eckit(CMakePackage):
def cmake_args(self):
args = [
# Some features that we want to build are experimental:
- self.define("ENABLE_EXPERIMENTAL", True),
+ self.define("ENABLE_EXPERIMENTAL", self._enable_experimental),
self.define_from_variant("ENABLE_BUILD_TOOLS", "tools"),
# We let ecBuild find the MPI library. We could help it by setting
# CMAKE_C_COMPILER to mpicc but that might give CMake a wrong
@@ -149,3 +149,22 @@ class Eckit(CMakePackage):
args.append(self.define("CURSES_NEED_NCURSES", True))
return args
+
+ def check(self):
+ ctest_args = ["-j", str(make_jobs)]
+
+ broken_tests = []
+ if self._enable_experimental:
+ # The following test quasi-randomly fails not because it reveals a bug in the library
+ # but because its implementation has a bug (static initialization order fiasco):
+ broken_tests.append("eckit_test_experimental_singleton_singleton")
+
+ if broken_tests:
+ ctest_args.extend(["-E", "|".join(broken_tests)])
+
+ with working_dir(self.build_directory):
+ ctest(*ctest_args)
+
+ @property
+ def _enable_experimental(self):
+ return "linalg=armadillo" in self.spec