summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2020-08-27 11:09:56 -0600
committerGitHub <noreply@github.com>2020-08-27 12:09:56 -0500
commitccae9cff3acec98aa40ffdf930ba1d6e49785994 (patch)
tree53a71b1eeae8230023227570d22614ff4f3781cf
parent680c1b339aa6b314da8463ed96ac325e1fcd103a (diff)
downloadspack-ccae9cff3acec98aa40ffdf930ba1d6e49785994.tar.gz
spack-ccae9cff3acec98aa40ffdf930ba1d6e49785994.tar.bz2
spack-ccae9cff3acec98aa40ffdf930ba1d6e49785994.tar.xz
spack-ccae9cff3acec98aa40ffdf930ba1d6e49785994.zip
Add nalu-wind test structure (#13640)
- Add custom function to checkout submoudles if testing is enabled
-rw-r--r--var/spack/repos/builtin/packages/nalu-wind/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py
index 9691f1f50e..38a81629a7 100644
--- a/var/spack/repos/builtin/packages/nalu-wind/package.py
+++ b/var/spack/repos/builtin/packages/nalu-wind/package.py
@@ -117,4 +117,15 @@ class NaluWind(CMakePackage):
if 'darwin' in spec.architecture:
options.append('-DCMAKE_MACOSX_RPATH:BOOL=ON')
+ if self.run_tests:
+ options.append('-DENABLE_TESTS:BOOL=ON')
+ else:
+ options.append('-DENABLE_TESTS:BOOL=OFF')
+
return options
+
+ @run_before('cmake')
+ def add_submodules(self):
+ if self.run_tests:
+ git = which('git')
+ git('submodule', 'update', '--init', '--recursive')