diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2023-05-12 04:22:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 13:22:11 +0200 |
commit | 9201b66792edbb34f20576b098499fb6818b886b (patch) | |
tree | 67b5f76d967b978b58f9ba440c513275754b3bbd /var/spack | |
parent | fd45839c04b1130a8da7ad31fa9abc316fd2ddf6 (diff) | |
download | spack-9201b66792edbb34f20576b098499fb6818b886b.tar.gz spack-9201b66792edbb34f20576b098499fb6818b886b.tar.bz2 spack-9201b66792edbb34f20576b098499fb6818b886b.tar.xz spack-9201b66792edbb34f20576b098499fb6818b886b.zip |
AML: Convert to new stand-alone test process (#35701)
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/aml/package.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/aml/package.py b/var/spack/repos/builtin/packages/aml/package.py index 33bcdd101b..5d4114a275 100644 --- a/var/spack/repos/builtin/packages/aml/package.py +++ b/var/spack/repos/builtin/packages/aml/package.py @@ -109,15 +109,13 @@ class Aml(AutotoolsPackage): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources(self.smoke_test_src) - def run_install_tutorial_check(self): - """Run tutorial tests as install checks""" - - src = join_path(self.test_suite.current_test_cache_dir, self.smoke_test_src) - cc_exe = os.environ["CC"] + def test_check_tutorial(self): + """Compile and run the tutorial tests as install checks""" + cc = which(os.environ["CC"]) cc_options = [ "-o", self.smoke_test, - src, + join_path(self.test_suite.current_test_cache_dir, self.smoke_test_src), "-I{0}".format(self.prefix.include), "-I{0}".format(self.spec["numactl"].prefix.include), "-L{0}".format(self.prefix.lib), @@ -125,11 +123,8 @@ class Aml(AutotoolsPackage): "-lexcit", "-lpthread", ] + cc(*cc_options) - self.run_test( - cc_exe, cc_options, purpose="test: compile {0} tutorial".format(self.smoke_test) - ) - self.run_test(self.smoke_test, purpose="test: run {0} tutorial".format(self.smoke_test)) - - def test(self): - self.run_install_tutorial_check() + smoke_test = which(self.smoke_test) + out = smoke_test(output=str.split, error=str.split) + assert "Hello world" in out |