summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Shudler <shudler1@llnl.gov>2021-01-20 15:05:25 -0800
committerGitHub <noreply@github.com>2021-01-20 15:05:25 -0800
commita95bf8df436dae2e360f916f92c517508c5fc45a (patch)
tree5108f974f52acebf74c68f763813c17f3c02b4af
parenta6ea16ded53bb688113012114a25b7d75e6460c0 (diff)
downloadspack-a95bf8df436dae2e360f916f92c517508c5fc45a.tar.gz
spack-a95bf8df436dae2e360f916f92c517508c5fc45a.tar.bz2
spack-a95bf8df436dae2e360f916f92c517508c5fc45a.tar.xz
spack-a95bf8df436dae2e360f916f92c517508c5fc45a.zip
Mirror current E4S hypre test suite test as a smoke test (#20484)
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index 4c92d5cb84..3f8a892395 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -19,6 +19,8 @@ class Hypre(Package):
maintainers = ['ulrikeyang', 'osborn9', 'balay']
+ test_requires_compiler = True
+
version('develop', branch='master')
version('2.20.0', sha256='5be77b28ddf945c92cde4b52a272d16fb5e9a7dc05e714fc5765948cba802c01')
version('2.19.0', sha256='466b19d8a86c69989a237f6f03f20d35c0c63a818776d2cd071b0a084cffeba5')
@@ -176,6 +178,27 @@ class Hypre(Package):
'-rhsone')
make("install")
+ @run_after('install')
+ def cache_test_sources(self):
+ srcs = ['src/examples']
+ self.cache_extra_test_sources(srcs)
+
+ def test(self):
+ """Perform smoke test on installed HYPRE package."""
+
+ if '+mpi' in self.spec:
+ examples_dir = join_path(self.install_test_root, 'src/examples')
+ with working_dir(examples_dir, create=False):
+ make("HYPRE_DIR=" + self.prefix, "bigint")
+
+ reason = "test: ensuring HYPRE examples run"
+ self.run_test('./ex5big', [], [], installed=True,
+ purpose=reason, skip_missing=True, work_dir='.')
+ self.run_test('./ex15big', [], [], installed=True,
+ purpose=reason, skip_missing=True, work_dir='.')
+
+ make("distclean")
+
@property
def headers(self):
"""Export the main hypre header, HYPRE.h; all other headers can be found