diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2023-05-19 05:06:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 08:06:33 -0400 |
commit | e9e5beee1f066d1ac211740d1d0dbda6154b6e1e (patch) | |
tree | 96eac39ae20982b8f4c2e0500a9a78802f6b2fde | |
parent | ffd134c09d5682fdfe4969f051916c89fc6b25df (diff) | |
download | spack-e9e5beee1f066d1ac211740d1d0dbda6154b6e1e.tar.gz spack-e9e5beee1f066d1ac211740d1d0dbda6154b6e1e.tar.bz2 spack-e9e5beee1f066d1ac211740d1d0dbda6154b6e1e.tar.xz spack-e9e5beee1f066d1ac211740d1d0dbda6154b6e1e.zip |
fortrilinos: convert to new stand-alone test process (#37783)
-rw-r--r-- | var/spack/repos/builtin/packages/fortrilinos/package.py | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/fortrilinos/package.py b/var/spack/repos/builtin/packages/fortrilinos/package.py index ca7c7ace51..0ed163705b 100644 --- a/var/spack/repos/builtin/packages/fortrilinos/package.py +++ b/var/spack/repos/builtin/packages/fortrilinos/package.py @@ -91,27 +91,20 @@ class Fortrilinos(CMakePackage): 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 - ) - - 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, - ) + cmake = which(self.spec["cmake"].prefix.bin.cmake) + ctest = which("ctest") + make = which("make") + + 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 |