diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2024-06-17 14:17:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 15:17:30 -0600 |
commit | 0f2c7248c81cef5039353903bae671aad95952d3 (patch) | |
tree | 1883eaf54ac55dd5628acbb2e29a1684df994dcd /var | |
parent | 8cc4ad3ac5746e3840abb93bd8a75912989ffa70 (diff) | |
download | spack-0f2c7248c81cef5039353903bae671aad95952d3.tar.gz spack-0f2c7248c81cef5039353903bae671aad95952d3.tar.bz2 spack-0f2c7248c81cef5039353903bae671aad95952d3.tar.xz spack-0f2c7248c81cef5039353903bae671aad95952d3.zip |
Bugfix: omega-h stand-alone tests: ensure proper ordering (#44748)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/omega-h/package.py | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index 17fdeed247..0920e89eae 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -158,27 +158,20 @@ class OmegaH(CMakePackage, CudaPackage): return (None, None, flags) - def test_osh_box(self): - """testing mesh construction""" - if self.spec.version < Version("9.34.1"): + def test_mesh(self): + """test construction, adaptation, and conversion of a mesh""" + if self.spec.satisfies("@:9.34.0"): raise SkipTest("Package must be installed as version 9.34.1 or later") - exe = which(join_path(self.prefix.bin, "osh_box")) - options = ["1", "1", "1", "2", "2", "2", "box.osh"] - exe(*options) - def test_osh_scale(self): - """testing mesh adaptation""" - if self.spec.version < Version("9.34.1"): - raise SkipTest("Package must be installed as version 9.34.1 or later") - exe = which(join_path(self.prefix.bin, "osh_scale")) - options = ["box.osh", "100", "box_100.osh"] - actual = exe(*options, output=str.split, error=str.split) - assert "adapting took" in actual - - def test_osh2vtk(self): - """testing mesh to vtu conversion""" - if self.spec.version < Version("9.34.1"): - raise SkipTest("Package must be installed as version 9.34.1 or later") - exe = which(join_path(self.prefix.bin, "osh2vtk")) - options = ["box_100.osh", "box_100_vtk"] - exe(*options) + with test_part(self, "test_mesh_create", purpose="mesh construction"): + exe = which(self.prefix.bin.osh_box) + exe("1", "1", "1", "2", "2", "2", "box.osh") + + with test_part(self, "test_mesh_adapt", purpose="mesh adaptation"): + exe = which(self.prefix.bin.osh_scale) + actual = exe("box.osh", "100", "box_100.osh", output=str.split, error=str.split) + assert "adapting took" in actual + + with test_part(self, "test_mesh_convert", purpose="mesh to vtu conversion"): + exe = which(self.prefix.bin.osh2vtk) + exe("box_100.osh", "box_100_vtk") |