hiop: Enable barebones testing (#30313)
* Enable barebones testing Run 6 test cases representative of the entire HiOp test suite. * Apply style changes * Dont use unpacking for py2 compat
This commit is contained in:
parent
5593611b5e
commit
2515cafb9c
@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
import llnl.util.tty as tty
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
@ -204,3 +208,36 @@ def cmake_args(self):
|
|||||||
args.append(self.define('HIOP_COINHSL_DIR', spec['coinhsl'].prefix))
|
args.append(self.define('HIOP_COINHSL_DIR', spec['coinhsl'].prefix))
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
# If testing on a cluster without access to home directory in a job, you may
|
||||||
|
# set the following environment variables to prevent related errors:
|
||||||
|
#
|
||||||
|
# export SPACK_USER_CACHE_PATH=/tmp/spack
|
||||||
|
# export SPACK_DISABLE_LOCAL_CONFIG=true
|
||||||
|
def test(self):
|
||||||
|
if not self.spec.satisfies('@develop') or \
|
||||||
|
not os.path.isdir(self.prefix.bin):
|
||||||
|
tty.info('Skipping: checks not installed in bin for v{0}'.
|
||||||
|
format(self.version))
|
||||||
|
return
|
||||||
|
|
||||||
|
tests = [
|
||||||
|
['NlpMdsEx1.exe', '400', '100', '0', '-selfcheck'],
|
||||||
|
['NlpMdsEx1.exe', '400', '100', '1', '-selfcheck'],
|
||||||
|
['NlpMdsEx1.exe', '400', '100', '0', '-empty_sp_row', '-selfcheck'],
|
||||||
|
]
|
||||||
|
|
||||||
|
if '+raja' in self.spec:
|
||||||
|
tests.extend([
|
||||||
|
['NlpMdsEx1Raja.exe', '400', '100', '0', '-selfcheck'],
|
||||||
|
['NlpMdsEx1Raja.exe', '400', '100', '1', '-selfcheck'],
|
||||||
|
['NlpMdsEx1Raja.exe', '400', '100', '0', '-empty_sp_row', '-selfcheck'],
|
||||||
|
])
|
||||||
|
|
||||||
|
for i, test in enumerate(tests):
|
||||||
|
exe = os.path.join(self.prefix.bin, test[0])
|
||||||
|
args = test[1:]
|
||||||
|
reason = 'test {0}: "{1}"'.format(i, ' '.join(test))
|
||||||
|
self.run_test(exe, args, [], 0, installed=False,
|
||||||
|
purpose=reason, skip_missing=True,
|
||||||
|
work_dir=self.prefix.bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user