eigenexa: update stand-alone tests to use test stage work directory (#24129)
This commit is contained in:
parent
cb87271a01
commit
6d30299d80
@ -52,18 +52,33 @@ def setup_build_environment(self, env):
|
|||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def cache_test_sources(self):
|
def cache_test_sources(self):
|
||||||
|
"""Save off benchmark files for stand-alone tests."""
|
||||||
self.cache_extra_test_sources("benchmark")
|
self.cache_extra_test_sources("benchmark")
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
test_dir = self.test_suite.current_test_data_dir
|
"""Perform stand-alone/smoke tests using pre-built benchmarks."""
|
||||||
exe_name = join_path(test_dir, "run-test.sh")
|
# NOTE: This package would ideally build the test program using
|
||||||
mpi_name = self.spec["mpi"].prefix.bin.mpirun
|
# the installed software *each* time the tests are run since
|
||||||
test_file = join_path(
|
# this package installs a library.
|
||||||
self.install_test_root, "benchmark", "eigenexa_benchmark"
|
|
||||||
|
test_cache_dir = join_path(
|
||||||
|
self.test_suite.current_test_cache_dir,
|
||||||
|
"benchmark"
|
||||||
)
|
)
|
||||||
input_file = join_path(self.install_test_root, "benchmark", "IN")
|
test_data_dir = self.test_suite.current_test_data_dir
|
||||||
opts = [exe_name, mpi_name, '-n', '1', test_file, '-f', input_file]
|
|
||||||
|
opts = [
|
||||||
|
"run-test.sh",
|
||||||
|
self.spec["mpi"].prefix.bin.mpirun,
|
||||||
|
'-n', '1',
|
||||||
|
join_path(test_cache_dir, "eigenexa_benchmark"),
|
||||||
|
'-f', join_path(test_cache_dir, "IN")
|
||||||
|
]
|
||||||
env["OMP_NUM_THREADS"] = "1"
|
env["OMP_NUM_THREADS"] = "1"
|
||||||
self.run_test(
|
self.run_test(
|
||||||
"sh", options=opts, expected="EigenExa Test Passed !", work_dir=test_dir
|
"sh",
|
||||||
|
options=opts,
|
||||||
|
expected="EigenExa Test Passed !",
|
||||||
|
purpose="test: running benchmark checks",
|
||||||
|
work_dir=test_data_dir
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user