Legion: Add E4S testsuite stand alone test (#25285)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
This commit is contained in:
parent
2633cf7da6
commit
7adacf967d
@ -332,3 +332,44 @@ def cmake_args(self):
|
|||||||
options.append('-DBUILD_MARCH:STRING=native')
|
options.append('-DBUILD_MARCH:STRING=native')
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
@run_after('install')
|
||||||
|
def cache_test_sources(self):
|
||||||
|
"""Copy the example source files after the package is installed to an
|
||||||
|
install test subdirectory for use during `spack test run`."""
|
||||||
|
self.cache_extra_test_sources([join_path('examples', 'local_function_tasks')])
|
||||||
|
|
||||||
|
def run_local_function_tasks_test(self):
|
||||||
|
"""Run stand alone test: local_function_tasks"""
|
||||||
|
|
||||||
|
test_dir = join_path(self.test_suite.current_test_cache_dir,
|
||||||
|
'examples', 'local_function_tasks')
|
||||||
|
|
||||||
|
if not os.path.exists(test_dir):
|
||||||
|
print('Skipping local_function_tasks test')
|
||||||
|
return
|
||||||
|
|
||||||
|
exe = 'local_function_tasks'
|
||||||
|
|
||||||
|
cmake_args = ['-DCMAKE_C_COMPILER={0}'.format(self.compiler.cc),
|
||||||
|
'-DCMAKE_CXX_COMPILER={0}'.format(self.compiler.cxx),
|
||||||
|
'-DLegion_DIR={0}'.format(join_path(self.prefix,
|
||||||
|
'share',
|
||||||
|
'Legion',
|
||||||
|
'cmake'))]
|
||||||
|
|
||||||
|
self.run_test('cmake',
|
||||||
|
options=cmake_args,
|
||||||
|
purpose='test: generate makefile for {0} example'.format(exe),
|
||||||
|
work_dir=test_dir)
|
||||||
|
|
||||||
|
self.run_test('make',
|
||||||
|
purpose='test: build {0} example'.format(exe),
|
||||||
|
work_dir=test_dir)
|
||||||
|
|
||||||
|
self.run_test(exe,
|
||||||
|
purpose='test: run {0} example'.format(exe),
|
||||||
|
work_dir=test_dir)
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
self.run_local_function_tasks_test()
|
||||||
|
Loading…
Reference in New Issue
Block a user