mfem: Update stand-alone test to use test stage directory (#25744)
This commit is contained in:
parent
f71d93fc55
commit
487edcc416
@ -806,20 +806,39 @@ def cache_test_sources(self):
|
||||
self.examples_data_dir])
|
||||
|
||||
def test(self):
|
||||
test_dir = join_path(self.install_test_root, self.examples_src_dir)
|
||||
with working_dir(test_dir, create=False):
|
||||
test_dir = join_path(
|
||||
self.test_suite.current_test_cache_dir,
|
||||
self.examples_src_dir
|
||||
)
|
||||
|
||||
# MFEM has many examples to serve as a suitable smoke check. ex10
|
||||
# was chosen arbitrarily among the examples that work both with
|
||||
# MPI and without it
|
||||
test_exe = 'ex10p' if ('+mpi' in self.spec) else 'ex10'
|
||||
make('CONFIG_MK={0}/share/mfem/config.mk'.format(self.prefix),
|
||||
test_exe, parallel=False)
|
||||
self.run_test('./{0}'.format(test_exe),
|
||||
['--mesh', '../{0}/beam-quad.mesh'.format(
|
||||
self.examples_data_dir)],
|
||||
[], installed=True, purpose='Smoke test for mfem',
|
||||
skip_missing=False, work_dir='.')
|
||||
make('clean')
|
||||
self.run_test(
|
||||
'make',
|
||||
[
|
||||
'CONFIG_MK={0}/share/mfem/config.mk'.format(self.prefix),
|
||||
test_exe,
|
||||
'parallel=False'
|
||||
],
|
||||
purpose='test: building {0}'.format(test_exe),
|
||||
skip_missing=False,
|
||||
work_dir=test_dir,
|
||||
)
|
||||
|
||||
self.run_test(
|
||||
'./{0}'.format(test_exe),
|
||||
[
|
||||
'--mesh',
|
||||
'../{0}/beam-quad.mesh'.format(self.examples_data_dir)
|
||||
],
|
||||
[],
|
||||
installed=False,
|
||||
purpose='test: running {0}'.format(test_exe),
|
||||
skip_missing=False,
|
||||
work_dir=test_dir,
|
||||
)
|
||||
|
||||
# this patch is only needed for mfem 4.1, where a few
|
||||
# released files include byte order marks
|
||||
|
Loading…
Reference in New Issue
Block a user