summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorRicharda Butler <39577672+RikkiButler20@users.noreply.github.com>2021-08-31 16:57:55 -0700
committerGitHub <noreply@github.com>2021-08-31 16:57:55 -0700
commit7adacf967daa6ea599cfabb8e1c480cbe0e989a8 (patch)
treeb9c5a2023729ee1050e430fdb5e4ecd8441184a1 /var
parent2633cf7da6edde6104b9dd0b0422ff6b2c831a47 (diff)
downloadspack-7adacf967daa6ea599cfabb8e1c480cbe0e989a8.tar.gz
spack-7adacf967daa6ea599cfabb8e1c480cbe0e989a8.tar.bz2
spack-7adacf967daa6ea599cfabb8e1c480cbe0e989a8.tar.xz
spack-7adacf967daa6ea599cfabb8e1c480cbe0e989a8.zip
Legion: Add E4S testsuite stand alone test (#25285)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index be91106d2d..7949036b2e 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -332,3 +332,44 @@ class Legion(CMakePackage):
options.append('-DBUILD_MARCH:STRING=native')
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()