diff options
author | AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> | 2024-06-14 19:03:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 20:03:39 -0600 |
commit | 456a8e3553987c60a18d4a49cb5c088f5c59c5de (patch) | |
tree | a9aaa7f66c50cda730166ddc36ddb8f1d44b4334 /var | |
parent | db94696cf0a07db91079b006e0ae3ce9154429c1 (diff) | |
download | spack-456a8e3553987c60a18d4a49cb5c088f5c59c5de.tar.gz spack-456a8e3553987c60a18d4a49cb5c088f5c59c5de.tar.bz2 spack-456a8e3553987c60a18d4a49cb5c088f5c59c5de.tar.xz spack-456a8e3553987c60a18d4a49cb5c088f5c59c5de.zip |
omega-h: reformatted from old test method to new test method (#44712)
* omega-h: reformatted from old test method to new test method
* omega-h: added proper output checking
--------
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/omega-h/package.py | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index 25887e0491..17fdeed247 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -158,23 +158,27 @@ class OmegaH(CMakePackage, CudaPackage): return (None, None, flags) - def test(self): + def test_osh_box(self): + """testing mesh construction""" if self.spec.version < Version("9.34.1"): - print("Skipping tests since only relevant for versions > 9.34.1") - return - - exe = join_path(self.prefix.bin, "osh_box") + 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"] - description = "testing mesh construction" - self.run_test(exe, options, purpose=description) + exe(*options) - exe = join_path(self.prefix.bin, "osh_scale") + 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"] - expected = "adapting took" - description = "testing mesh adaptation" - self.run_test(exe, options, expected, purpose=description) + actual = exe(*options, output=str.split, error=str.split) + assert "adapting took" in actual - exe = join_path(self.prefix.bin, "osh2vtk") + 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"] - description = "testing mesh to vtu conversion" - self.run_test(exe, options, purpose=description) + exe(*options) |