summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicharda Butler <39577672+RikkiButler20@users.noreply.github.com>2021-12-03 10:03:14 -0800
committerGitHub <noreply@github.com>2021-12-03 10:03:14 -0800
commit86b17193ded0a490299f0c16a924a0827101a931 (patch)
tree091587dc227908cd93845deea166cb49d7adda4c
parent96a50db34489ea75817e6e4340564656a2025aee (diff)
downloadspack-86b17193ded0a490299f0c16a924a0827101a931.tar.gz
spack-86b17193ded0a490299f0c16a924a0827101a931.tar.bz2
spack-86b17193ded0a490299f0c16a924a0827101a931.tar.xz
spack-86b17193ded0a490299f0c16a924a0827101a931.zip
Parallel-netcdf: Update Spack test dir (#27232)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/parallel-netcdf/package.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
index a9ec5fd8d7..64082462a3 100644
--- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
@@ -177,7 +177,7 @@ class ParallelNetcdf(AutotoolsPackage):
return args
- examples_src_dir = 'examples/CXX'
+ examples_src_dir = join_path('examples', 'CXX')
@run_after('install')
def cache_test_sources(self):
@@ -186,19 +186,24 @@ class ParallelNetcdf(AutotoolsPackage):
self.cache_extra_test_sources([self.examples_src_dir])
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.
# column_wise was chosen based on the E4S test suite. Other
# examples should work as well.
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'
self.run_test(self.spec['mpi'].mpicxx, options, [],
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:
if os.path.isfile(mpiexe):
- self.run_test(mpiexe, ['-n', '4', test_exe], [],
+ self.run_test(mpiexe, ['-n', '1', test_exe], [],
installed=False,
purpose='test: pnetcdf smoke test',
skip_missing=True,