fortrilinos: convert to new stand-alone test process (#37783)
This commit is contained in:
parent
ffd134c09d
commit
e9e5beee1f
@ -91,27 +91,20 @@ def setup_smoke_tests(self):
|
|||||||
install test subdirectory for use during `spack test run`."""
|
install test subdirectory for use during `spack test run`."""
|
||||||
self.cache_extra_test_sources([self.examples_src_dir])
|
self.cache_extra_test_sources([self.examples_src_dir])
|
||||||
|
|
||||||
def test(self):
|
def test_installation(self):
|
||||||
"""Perform stand-alone/smoke tests using installed package."""
|
"""build and run ctest against the installed software"""
|
||||||
cmake_args = [
|
cmake_args = [
|
||||||
self.define("CMAKE_PREFIX_PATH", self.prefix),
|
self.define("CMAKE_PREFIX_PATH", self.prefix),
|
||||||
self.define("CMAKE_CXX_COMPILER", self.compiler.cxx),
|
self.define("CMAKE_CXX_COMPILER", self.compiler.cxx),
|
||||||
self.define("CMAKE_Fortran_COMPILER", self.compiler.fc),
|
self.define("CMAKE_Fortran_COMPILER", self.compiler.fc),
|
||||||
self.cached_tests_work_dir,
|
self.cached_tests_work_dir,
|
||||||
]
|
]
|
||||||
self.run_test(
|
cmake = which(self.spec["cmake"].prefix.bin.cmake)
|
||||||
"cmake", cmake_args, purpose="test: calling cmake", work_dir=self.cached_tests_work_dir
|
ctest = which("ctest")
|
||||||
)
|
make = which("make")
|
||||||
|
|
||||||
self.run_test(
|
with working_dir(self.cached_tests_work_dir, create=True):
|
||||||
"make", [], purpose="test: calling make", work_dir=self.cached_tests_work_dir
|
cmake(*cmake_args)
|
||||||
)
|
make()
|
||||||
|
out = ctest("-V", output=str.split, error=str.split)
|
||||||
self.run_test(
|
assert "100% tests passed" in out
|
||||||
"ctest",
|
|
||||||
["-V"],
|
|
||||||
["100% tests passed"],
|
|
||||||
installed=False,
|
|
||||||
purpose="test: testing the installation",
|
|
||||||
work_dir=self.cached_tests_work_dir,
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user