cpmd: convert to new stand-alone test process (#35744)
This commit is contained in:
parent
175a65dfba
commit
5e630174a1
@ -36,6 +36,7 @@ def edit(self, spec, prefix):
|
|||||||
else:
|
else:
|
||||||
fc = spack_fc
|
fc = spack_fc
|
||||||
cc = spack_cc
|
cc = spack_cc
|
||||||
|
cp.filter(r"FFLAGS='([^']*)'", "FFLAGS='\\1 -fallow-argument-mismatch'")
|
||||||
|
|
||||||
cp.filter("FC=.+", "FC='{0}'".format(fc))
|
cp.filter("FC=.+", "FC='{0}'".format(fc))
|
||||||
cp.filter("CC=.+", "CC='{0}'".format(cc))
|
cp.filter("CC=.+", "CC='{0}'".format(cc))
|
||||||
@ -71,7 +72,7 @@ def edit(self, spec, prefix):
|
|||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
install_tree(".", prefix)
|
install_tree(".", prefix)
|
||||||
|
|
||||||
def test(self):
|
def test_cpmd(self):
|
||||||
test_dir = self.test_suite.current_test_data_dir
|
test_dir = self.test_suite.current_test_data_dir
|
||||||
test_file = join_path(test_dir, "1-h2o-pbc-geoopt.inp")
|
test_file = join_path(test_dir, "1-h2o-pbc-geoopt.inp")
|
||||||
opts = []
|
opts = []
|
||||||
@ -83,9 +84,12 @@ def test(self):
|
|||||||
exe_name = "cpmd.x"
|
exe_name = "cpmd.x"
|
||||||
opts.append(test_file)
|
opts.append(test_file)
|
||||||
opts.append(test_dir)
|
opts.append(test_dir)
|
||||||
|
cpmd = which(exe_name)
|
||||||
|
out = cpmd(*opts, output=str.split, error=str.split)
|
||||||
|
|
||||||
expected = [
|
expected = [
|
||||||
"2 1 H O 1.84444 0.97604",
|
"2 1 H O 1.84444 0.97604",
|
||||||
"3 1 H O 1.84444 0.97604",
|
"3 1 H O 1.84444 0.97604",
|
||||||
"2 1 3 H O H 103.8663",
|
"2 1 3 H O H 103.8663",
|
||||||
]
|
]
|
||||||
self.run_test(exe_name, options=opts, expected=expected)
|
check_outputs(expected, out)
|
||||||
|
Loading…
Reference in New Issue
Block a user