Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 14 additions & 2 deletions sycl/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,23 @@
# test_exec_root: The root path where tests should be run.
config.test_exec_root = os.path.join(config.sycl_obj_root, 'test')

llvm_config.use_clang()

# Propagate some variables from the host environment.
llvm_config.with_system_environment(['PATH', 'OCL_ICD_FILENAMES', 'SYCL_DEVICE_ALLOWLIST', 'SYCL_CONFIG_FILE_NAME'])

# Propagate extra environment variables
if config.extra_environment:
lit_config.note("Extra environment variables")
for env_pair in config.extra_environment.split(','):
[var,val]=env_pair.split("=")
if val:
llvm_config.with_environment(var,val)
lit_config.note("\t"+var+"="+val)
else:
lit_config.note("\tUnset "+var)
llvm_config.with_environment(var,"")

# Configure LD_LIBRARY_PATH or corresponding os-specific alternatives
# Add 'libcxx' feature to filter out all SYCL abi tests when SYCL runtime
# is built with llvm libcxx. This feature is added for Linux only since MSVC
Expand Down Expand Up @@ -76,8 +90,6 @@
config.substitutions.append( ('%llvm_build_lib_dir', config.llvm_build_lib_dir ) )
config.substitutions.append( ('%llvm_build_bin_dir', config.llvm_build_bin_dir ) )

llvm_config.use_clang()

llvm_config.add_tool_substitutions(['llvm-spirv'], [config.sycl_tools_dir])

config.substitutions.append( ('%RUN_ON_HOST', "env SYCL_DEVICE_FILTER=host ") )
Expand Down
1 change: 1 addition & 0 deletions sycl/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config.llvm_enable_projects = "@LLVM_ENABLE_PROJECTS@"

config.sycl_threads_lib = '@SYCL_THREADS_LIB@'
config.sycl_use_libcxx = '@SYCL_USE_LIBCXX@'
config.extra_environment = lit_config.params.get("extra_environment", "@LIT_EXTRA_ENVIRONMENT@")

import lit.llvm
lit.llvm.initialize(lit_config, config)
Expand Down
12 changes: 12 additions & 0 deletions sycl/test/on-device/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
# Propagate some variables from the host environment.
llvm_config.with_system_environment(['PATH', 'OCL_ICD_FILENAMES', 'SYCL_DEVICE_ALLOWLIST', 'SYCL_CONFIG_FILE_NAME'])

# Propagate extra environment variables
if config.extra_environment:
lit_config.note("Extra environment variables")
for env_pair in config.extra_environment.split(','):
[var,val]=env_pair.split("=")
if val:
llvm_config.with_environment(var,val)
lit_config.note("\t"+var+"="+val)
else:
lit_config.note("\tUnset "+var)
llvm_config.with_environment(var,"")

# Configure LD_LIBRARY_PATH or corresponding os-specific alternatives
if platform.system() == "Linux":
config.available_features.add('linux')
Expand Down
1 change: 1 addition & 0 deletions sycl/test/on-device/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config.level_zero_include_dir = lit_config.params.get('LEVEL_ZERO_INCLUDE_DIR',
config.llvm_enable_projects = "@LLVM_ENABLE_PROJECTS@"

config.sycl_threads_lib = '@SYCL_THREADS_LIB@'
config.extra_environment = lit_config.params.get("extra_environment", "@LIT_EXTRA_ENVIRONMENT@")

import lit.llvm
lit.llvm.initialize(lit_config, config)
Expand Down