Load package environment prior to stand-alone/smoke test execution (#25619)
This commit is contained in:
parent
9d17d474ff
commit
b5d3c48824
@ -61,6 +61,7 @@
|
|||||||
import spack.schema.environment
|
import spack.schema.environment
|
||||||
import spack.store
|
import spack.store
|
||||||
import spack.subprocess_context
|
import spack.subprocess_context
|
||||||
|
import spack.user_environment
|
||||||
import spack.util.path
|
import spack.util.path
|
||||||
from spack.error import NoHeadersError, NoLibrariesError
|
from spack.error import NoHeadersError, NoLibrariesError
|
||||||
from spack.util.cpus import cpus_available
|
from spack.util.cpus import cpus_available
|
||||||
@ -69,6 +70,7 @@
|
|||||||
env_flag,
|
env_flag,
|
||||||
filter_system_paths,
|
filter_system_paths,
|
||||||
get_path,
|
get_path,
|
||||||
|
inspect_path,
|
||||||
is_system_path,
|
is_system_path,
|
||||||
preserve_environment,
|
preserve_environment,
|
||||||
system_dirs,
|
system_dirs,
|
||||||
@ -781,6 +783,13 @@ def setup_package(pkg, dirty, context='build'):
|
|||||||
"config to assume that the package is part of the system"
|
"config to assume that the package is part of the system"
|
||||||
" includes and omit it when invoked with '--cflags'.")
|
" includes and omit it when invoked with '--cflags'.")
|
||||||
elif context == 'test':
|
elif context == 'test':
|
||||||
|
env.extend(
|
||||||
|
inspect_path(
|
||||||
|
pkg.spec.prefix,
|
||||||
|
spack.user_environment.prefix_inspections(pkg.spec.platform),
|
||||||
|
exclude=is_system_path
|
||||||
|
)
|
||||||
|
)
|
||||||
pkg.setup_run_environment(env)
|
pkg.setup_run_environment(env)
|
||||||
env.prepend_path('PATH', '.')
|
env.prepend_path('PATH', '.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user