Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
lit_config.note("\tUnset " + var)
llvm_config.with_environment(var, "")

# So we can make subprocess calls with the same env that we use for the tests
env_str = "env " + " ".join(
[var + '="' + val + '"' for var, val in config.environment.items()]
)

config.substitutions.append(("%sycl_libs_dir", config.sycl_libs_dir))
if platform.system() == "Windows":
config.substitutions.append(
Expand Down Expand Up @@ -263,7 +268,7 @@ def open_check_file(file_name):

# check if compiler supports CL command line options
cl_options = False
sp = subprocess.getstatusoutput(config.dpcpp_compiler + " /help")
sp = subprocess.getstatusoutput(env_str + " " + config.dpcpp_compiler + " /help")
if sp[0] == 0:
cl_options = True
config.available_features.add("cl_options")
Expand Down Expand Up @@ -322,7 +327,12 @@ def open_check_file(file_name):
config.substitutions.append(("%level_zero_options", level_zero_options))

sp = subprocess.getstatusoutput(
config.dpcpp_compiler + " -fsycl " + check_l0_file + level_zero_options
env_str
+ " "
+ config.dpcpp_compiler
+ " -fsycl "
+ check_l0_file
+ level_zero_options
)
if sp[0] == 0:
config.available_features.add("level_zero_dev_kit")
Expand Down Expand Up @@ -350,7 +360,9 @@ def open_check_file(file_name):
)

sp = subprocess.getstatusoutput(
config.dpcpp_compiler
env_str
+ " "
+ config.dpcpp_compiler
+ " -fsycl -fpreview-breaking-changes "
+ check_preview_breaking_changes_file
)
Expand Down Expand Up @@ -419,7 +431,7 @@ def open_check_file(file_name):
config.substitutions.append(("%cuda_options", cuda_options))

sp = subprocess.getstatusoutput(
config.dpcpp_compiler + " -fsycl " + check_cuda_file + cuda_options
env_str + " " + config.dpcpp_compiler + " -fsycl " + check_cuda_file + cuda_options
)
if sp[0] == 0:
config.available_features.add("cuda_dev_kit")
Expand Down
Loading