Skip to content

Commit b23d69e

Browse files
[SYCL][E2E] Update current directory in with test_env: (#17532)
`open_check_file` creates files in `config.sycl_obj_root`, make sure we are in that directory when trying to compile those check files. Fixes incorrect `preview-breaking-changes-supported` detection in in-tree configuration (which most people are likely to use locally/interactively).
1 parent 0b39c51 commit b23d69e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,13 @@ def __enter__(self):
174174
self.old_environ = dict(os.environ)
175175
os.environ.clear()
176176
os.environ.update(config.environment)
177+
self.old_dir = os.getcwd()
178+
os.chdir(config.sycl_obj_root)
177179

178180
def __exit__(self, exc_type, exc_value, exc_traceback):
179181
os.environ.clear()
180182
os.environ.update(self.old_environ)
183+
os.chdir(self.old_dir)
181184

182185

183186
config.substitutions.append(("%sycl_libs_dir", config.sycl_libs_dir))

0 commit comments

Comments
 (0)