summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2023-08-09 06:59:51 -0700
committerGitHub <noreply@github.com>2023-08-09 15:59:51 +0200
commit5e630174a1cfb23666f88b4089ca446aac11a5b8 (patch)
tree3c796b138b0067335180f775308f01144dcf8f38 /var
parent175a65dfbae21f63784d579cfd2c7a7bb1cc9c45 (diff)
downloadspack-5e630174a1cfb23666f88b4089ca446aac11a5b8.tar.gz
spack-5e630174a1cfb23666f88b4089ca446aac11a5b8.tar.bz2
spack-5e630174a1cfb23666f88b4089ca446aac11a5b8.tar.xz
spack-5e630174a1cfb23666f88b4089ca446aac11a5b8.zip
cpmd: convert to new stand-alone test process (#35744)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cpmd/package.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/cpmd/package.py b/var/spack/repos/builtin/packages/cpmd/package.py
index 4206f7b4ab..1782d07b6b 100644
--- a/var/spack/repos/builtin/packages/cpmd/package.py
+++ b/var/spack/repos/builtin/packages/cpmd/package.py
@@ -36,6 +36,7 @@ class Cpmd(MakefilePackage):
else:
fc = spack_fc
cc = spack_cc
+ cp.filter(r"FFLAGS='([^']*)'", "FFLAGS='\\1 -fallow-argument-mismatch'")
cp.filter("FC=.+", "FC='{0}'".format(fc))
cp.filter("CC=.+", "CC='{0}'".format(cc))
@@ -71,7 +72,7 @@ class Cpmd(MakefilePackage):
def install(self, spec, prefix):
install_tree(".", prefix)
- def test(self):
+ def test_cpmd(self):
test_dir = self.test_suite.current_test_data_dir
test_file = join_path(test_dir, "1-h2o-pbc-geoopt.inp")
opts = []
@@ -83,9 +84,12 @@ class Cpmd(MakefilePackage):
exe_name = "cpmd.x"
opts.append(test_file)
opts.append(test_dir)
+ cpmd = which(exe_name)
+ out = cpmd(*opts, output=str.split, error=str.split)
+
expected = [
"2 1 H O 1.84444 0.97604",
"3 1 H O 1.84444 0.97604",
"2 1 3 H O H 103.8663",
]
- self.run_test(exe_name, options=opts, expected=expected)
+ check_outputs(expected, out)