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