summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorCameron Smith <cwsmith@users.noreply.github.com>2021-11-02 07:18:46 -0400
committerGitHub <noreply@github.com>2021-11-02 12:18:46 +0100
commitca30940868252c0206796b18df844436b13c9638 (patch)
treee21d8522f90f351207cfd48365c10455eb74747a /var
parent5a4d03060be6d5e097eec58551a666c67126e83f (diff)
downloadspack-ca30940868252c0206796b18df844436b13c9638.tar.gz
spack-ca30940868252c0206796b18df844436b13c9638.tar.bz2
spack-ca30940868252c0206796b18df844436b13c9638.tar.xz
spack-ca30940868252c0206796b18df844436b13c9638.zip
pumi: support build/install time and stand-alone testing (#26832)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/pumi/package.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/pumi/package.py b/var/spack/repos/builtin/packages/pumi/package.py
index 69356d74b8..445236c681 100644
--- a/var/spack/repos/builtin/packages/pumi/package.py
+++ b/var/spack/repos/builtin/packages/pumi/package.py
@@ -41,7 +41,7 @@ class Pumi(CMakePackage):
variant('shared', default=False, description='Build shared libraries')
variant('zoltan', default=False, description='Enable Zoltan Features')
variant('fortran', default=False, description='Enable FORTRAN interface')
- variant('testing', default=False, description='Enable tests')
+ variant('testing', default=False, description='Enable all tests')
variant('simmodsuite', default='none',
values=('none', 'base', 'kernels', 'full'),
description="Enable Simmetrix SimModSuite Support: 'base' enables "
@@ -97,10 +97,21 @@ class Pumi(CMakePackage):
args.append('-DSIM_MPI=' + mpi_id)
return args
- @run_after('build')
- @on_package_attributes(run_tests=True)
- def check(self):
- """Run ctest after building project."""
+ def test(self):
+ if self.spec.version <= Version('2.2.6'):
+ return
+ exe = 'uniform'
+ options = ['../testdata/pipe.dmg', '../testdata/pipe.smb', 'pipe_unif.smb']
+ expected = 'mesh pipe_unif.smb written'
+ description = 'testing pumi uniform mesh refinement'
+ self.run_test(exe, options, expected, purpose=description,
+ work_dir=self.prefix.bin)
- with working_dir(self.build_directory):
- ctest(parallel=False)
+ mpiexec = Executable(join_path(self.spec['mpi'].prefix.bin, 'mpiexec')).command
+ mpiopt = ['-n', '2']
+ exe = ['split']
+ options = ['../testdata/pipe.dmg', '../testdata/pipe.smb', 'pipe_2_.smb', '2']
+ expected = 'mesh pipe_2_.smb written'
+ description = 'testing pumi mesh partitioning'
+ self.run_test(mpiexec, mpiopt + exe + options, expected,
+ purpose=description, work_dir=self.prefix.bin)