diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2021-06-08 02:31:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 03:31:40 -0600 |
commit | 11fd88ee3c2da5dd9f30b2c203c601eecdaea3cd (patch) | |
tree | 91382d87f3e15084f2e4c8916df6876843593bf6 /var/spack | |
parent | 418db4e9106371976d0ac3d95b4b4bf5adf3ffc8 (diff) | |
download | spack-11fd88ee3c2da5dd9f30b2c203c601eecdaea3cd.tar.gz spack-11fd88ee3c2da5dd9f30b2c203c601eecdaea3cd.tar.bz2 spack-11fd88ee3c2da5dd9f30b2c203c601eecdaea3cd.tar.xz spack-11fd88ee3c2da5dd9f30b2c203c601eecdaea3cd.zip |
Update stand-alone tests to use test stage work directory; also added expected ctest output (#24191)
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/fortrilinos/package.py | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/fortrilinos/package.py b/var/spack/repos/builtin/packages/fortrilinos/package.py index fb96f87f2f..bd0da8b8e2 100644 --- a/var/spack/repos/builtin/packages/fortrilinos/package.py +++ b/var/spack/repos/builtin/packages/fortrilinos/package.py @@ -77,6 +77,12 @@ class Fortrilinos(CMakePackage): examples_src_dir = 'example/test-installation' + @property + def cached_tests_work_dir(self): + """The working directory for cached test sources.""" + return join_path(self.test_suite.current_test_cache_dir, + self.examples_src_dir) + @run_after('install') def setup_smoke_tests(self): """Copy the example source files after the package is installed to an @@ -84,17 +90,22 @@ class Fortrilinos(CMakePackage): self.cache_extra_test_sources([self.examples_src_dir]) def test(self): - example_src_dir = join_path(self.install_test_root, - self.examples_src_dir) - test_build_dir = join_path(self.test_suite.stage, - 'build_example') - with working_dir(test_build_dir, create=True): - cmake( - self.define('CMAKE_PREFIX_PATH', self.prefix), - self.define('CMAKE_CXX_COMPILER', self.compiler.cxx), - self.define('CMAKE_Fortran_COMPILER', self.compiler.fc), - example_src_dir - ) - make() - self.run_test('ctest', ['-V'], [], installed=False, - purpose='test: installation') + """Perform stand-alone/smoke tests using installed package.""" + 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) |