Skip to content

Commit e80b888

Browse files
[SYCL][E2E LIT] Don't spoil current directory with temporary files (#9078)
After #8854 it's possible to run llvm-lit from anywhere and not be restricted to the end-to-end tests' build directory. However, lit.cfg.py performs auto-detection of some features by creating and compiling small test files. Make sure that those are kept in the build directory no matter where we run llvm-lit from.
1 parent e11b358 commit e80b888

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@
127127
config.ze_debug = lit_config.params.get('ze_debug')
128128
lit_config.note("ZE_DEBUG: "+config.ze_debug)
129129

130+
# Make sure that any dynamic checks below are done in the build directory and
131+
# not where the sources are located. This is important for the in-tree
132+
# configuration (as opposite to the standalone one).
133+
os.chdir(config.sycl_obj_root)
134+
130135
# check if compiler supports CL command line options
131136
cl_options=False
132137
sp = subprocess.getstatusoutput(config.dpcpp_compiler+' /help')

0 commit comments

Comments
 (0)