summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2020-12-10 10:35:27 -0800
committerTamara Dahlgren <dahlgren1@llnl.gov>2021-02-17 17:07:25 -0800
commit802c5bdff7b32e425514f25a7ab55c2df5aa5b83 (patch)
tree2768b4cdd8e33ffabec3d83db06a2ea5bf6acef1 /lib
parentab3f1b10db7e9a64338f44ccca515a8356b4c43c (diff)
downloadspack-802c5bdff7b32e425514f25a7ab55c2df5aa5b83.tar.gz
spack-802c5bdff7b32e425514f25a7ab55c2df5aa5b83.tar.bz2
spack-802c5bdff7b32e425514f25a7ab55c2df5aa5b83.tar.xz
spack-802c5bdff7b32e425514f25a7ab55c2df5aa5b83.zip
Tests: enable re-use of post-install tests in smoke tests (#20298)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index cb1ba21ba5..a2eabbc3db 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -750,6 +750,9 @@ def setup_package(pkg, dirty, context='build'):
elif context == 'test':
import spack.user_environment as uenv # avoid circular import
env.extend(uenv.environment_modifications_for_spec(pkg.spec))
+ env.extend(
+ modifications_from_dependencies(pkg.spec, context=context)
+ )
set_module_variables_for_package(pkg)
env.prepend_path('PATH', '.')
@@ -814,7 +817,8 @@ def modifications_from_dependencies(spec, context):
}
deptype, method = deptype_and_method[context]
- for dspec in spec.traverse(order='post', root=False, deptype=deptype):
+ root = context == 'test'
+ for dspec in spec.traverse(order='post', root=root, deptype=deptype):
dpkg = dspec.package
set_module_variables_for_package(dpkg)
# Allow dependencies to modify the module