File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,9 @@ configure specific single test execution in the command line:
293
293
* ** extra_environment** - comma-separated list of variables with values to be
294
294
added to test environment. Can be also set by LIT_EXTRA_ENVIRONMENT variable
295
295
in CMake.
296
+ * ** extra_system_environment** - comma-separated list of variables to be
297
+ propagated from the host environment to test environment. Can be also set by
298
+ LIT_EXTRA_SYSTEM_ENVIRONMENT variable in CMake.
296
299
* ** level_zero_include** - directory containing Level_Zero native headers, can
297
300
be also set by CMake variable LEVEL_ZERO_INCLUDE.
298
301
* ** level_zero_libs_dir** - directory containing Level_Zero native libraries,
Original file line number Diff line number Diff line change 121
121
]
122
122
)
123
123
124
+ # Take into account extra system environment variables if provided via parameter.
125
+ if config .extra_system_environment :
126
+ lit_config .note (
127
+ "Extra system variables to propagate value from: "
128
+ + config .extra_system_environment
129
+ )
130
+ extra_env_vars = config .extra_system_environment .split ("," )
131
+ for var in extra_env_vars :
132
+ if var in os .environ :
133
+ llvm_config .with_system_environment (var )
134
+
124
135
llvm_config .with_environment ("PATH" , config .lit_tools_dir , append_path = True )
125
136
126
137
# Configure LD_LIBRARY_PATH or corresponding os-specific alternatives
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ config.sycl_build_targets = set("target-" + t for t in lit_config.params.get(
38
38
config.amd_arch = lit_config.params.get("amd_arch", "@AMD_ARCH@")
39
39
config.sycl_threads_lib = '@SYCL_THREADS_LIB@'
40
40
config.extra_environment = lit_config.params.get("extra_environment", "@LIT_EXTRA_ENVIRONMENT@")
41
+ config.extra_system_environment = lit_config.params.get("extra_system_environment", "@LIT_EXTRA_SYSTEM_ENVIRONMENT@")
41
42
config.cxx_flags = lit_config.params.get("cxx_flags", "@SYCL_E2E_CLANG_CXX_FLAGS@")
42
43
config.c_flags = "@CMAKE_C_FLAGS@"
43
44
config.external_tests = "@SYCL_EXTERNAL_TESTS@"
You can’t perform that action at this time.
0 commit comments