Parallel-netcdf: Update Spack test dir (#27232)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
This commit is contained in:
parent
96a50db344
commit
86b17193de
1 changed files with 10 additions and 5 deletions
|
@ -177,7 +177,7 @@ def configure_args(self):
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
examples_src_dir = 'examples/CXX'
|
examples_src_dir = join_path('examples', 'CXX')
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def cache_test_sources(self):
|
def cache_test_sources(self):
|
||||||
|
@ -186,19 +186,24 @@ def cache_test_sources(self):
|
||||||
self.cache_extra_test_sources([self.examples_src_dir])
|
self.cache_extra_test_sources([self.examples_src_dir])
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
test_dir = join_path(self.install_test_root, self.examples_src_dir)
|
test_dir = join_path(self.test_suite.current_test_cache_dir,
|
||||||
|
self.examples_src_dir)
|
||||||
# pnetcdf has many examples to serve as a suitable smoke check.
|
# pnetcdf has many examples to serve as a suitable smoke check.
|
||||||
# column_wise was chosen based on the E4S test suite. Other
|
# column_wise was chosen based on the E4S test suite. Other
|
||||||
# examples should work as well.
|
# examples should work as well.
|
||||||
test_exe = 'column_wise'
|
test_exe = 'column_wise'
|
||||||
options = ['{0}.cpp'.format(test_exe), '-o', test_exe, '-lpnetcdf']
|
options = ['{0}.cpp'.format(test_exe), '-o', test_exe, '-lpnetcdf',
|
||||||
|
'-L{0}'.format(self.prefix.lib),
|
||||||
|
'-I{0}'.format(self.prefix.include)]
|
||||||
reason = 'test: compiling and linking pnetcdf example'
|
reason = 'test: compiling and linking pnetcdf example'
|
||||||
self.run_test(self.spec['mpi'].mpicxx, options, [],
|
self.run_test(self.spec['mpi'].mpicxx, options, [],
|
||||||
installed=False, purpose=reason, work_dir=test_dir)
|
installed=False, purpose=reason, work_dir=test_dir)
|
||||||
mpiexe_list = ['mpirun', 'mpiexec', 'srun']
|
mpiexe_list = [self.spec['mpi'].prefix.bin.srun,
|
||||||
|
self.spec['mpi'].prefix.bin.mpirun,
|
||||||
|
self.spec['mpi'].prefix.bin.mpiexec]
|
||||||
for mpiexe in mpiexe_list:
|
for mpiexe in mpiexe_list:
|
||||||
if os.path.isfile(mpiexe):
|
if os.path.isfile(mpiexe):
|
||||||
self.run_test(mpiexe, ['-n', '4', test_exe], [],
|
self.run_test(mpiexe, ['-n', '1', test_exe], [],
|
||||||
installed=False,
|
installed=False,
|
||||||
purpose='test: pnetcdf smoke test',
|
purpose='test: pnetcdf smoke test',
|
||||||
skip_missing=True,
|
skip_missing=True,
|
||||||
|
|
Loading…
Reference in a new issue