SUNDIALS: new version of sundials and guard against examples being install (#37576)
* add new version of sundials and guard against examples not installing * fix flipping of variant * fix directory not being there when writing a file
This commit is contained in:
parent
0d991de50a
commit
d97ecfe147
@ -27,6 +27,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# Versions
|
||||
# ==========================================================================
|
||||
version("develop", branch="develop")
|
||||
version("6.5.1", sha256="4252303805171e4dbdd19a01e52c1dcfe0dafc599c3cfedb0a5c2ffb045a8a75")
|
||||
version("6.5.0", sha256="4e0b998dff292a2617e179609b539b511eb80836f5faacf800e688a886288502")
|
||||
version("6.4.1", sha256="7bf10a8d2920591af3fba2db92548e91ad60eb7241ab23350a9b1bc51e05e8d0")
|
||||
version("6.4.0", sha256="0aff803a12c6d298d05b56839197dd09858631864017e255ed89e28b49b652f1")
|
||||
@ -773,6 +774,8 @@ def cmake_bin(self, set=True):
|
||||
"""(Hack) Set/get cmake dependency path."""
|
||||
filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
|
||||
if set:
|
||||
if not os.path.exists(self.install_test_root):
|
||||
mkdirp(self.install_test_root)
|
||||
with open(filepath, "w") as out_file:
|
||||
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
|
||||
out_file.write("{0}\n".format(cmake_bin))
|
||||
@ -782,7 +785,8 @@ def cmake_bin(self, set=True):
|
||||
|
||||
@run_after("install")
|
||||
def setup_smoke_tests(self):
|
||||
install_tree(self._smoke_tests_path, join_path(self.install_test_root, "testing"))
|
||||
if "+examples-install" in self.spec:
|
||||
install_tree(self._smoke_tests_path, join_path(self.install_test_root, "testing"))
|
||||
self.cmake_bin(set=True)
|
||||
|
||||
def build_smoke_tests(self):
|
||||
@ -792,6 +796,10 @@ def build_smoke_tests(self):
|
||||
tty.msg("Skipping sundials test: cmake_bin_path.txt not found")
|
||||
return
|
||||
|
||||
if "~examples-install" in self.spec:
|
||||
tty.msg("Skipping sundials test: examples were not installed")
|
||||
return
|
||||
|
||||
for smoke_test in self._smoke_tests:
|
||||
work_dir = join_path(self._smoke_tests_path, os.path.dirname(smoke_test[0]))
|
||||
with working_dir(work_dir):
|
||||
@ -800,6 +808,9 @@ def build_smoke_tests(self):
|
||||
self.run_test(exe="make")
|
||||
|
||||
def run_smoke_tests(self):
|
||||
if "~examples-install" in self.spec:
|
||||
return
|
||||
|
||||
for smoke_test in self._smoke_tests:
|
||||
self.run_test(
|
||||
exe=join_path(self._smoke_tests_path, smoke_test[0]),
|
||||
@ -811,6 +822,9 @@ def run_smoke_tests(self):
|
||||
)
|
||||
|
||||
def clean_smoke_tests(self):
|
||||
if "~examples-install" in self.spec:
|
||||
return
|
||||
|
||||
for smoke_test in self._smoke_tests:
|
||||
work_dir = join_path(self._smoke_tests_path, os.path.dirname(smoke_test[0]))
|
||||
with working_dir(work_dir):
|
||||
|
Loading…
Reference in New Issue
Block a user