Skip to content

Commit 19668be

Browse files
authored
[SYCL][E2E] Fix quote_path bug in lit config (#18218)
The quote_path bug does not only affecting Windows(#18135) but also Linux. This patch address this problem. This bug affects all usage of `quote_path`, notably the `level_zero_dev_kit` feature. ``` zsh$> cat 1.py import shlex ret = shlex.quote('') if ret: print("bug!") else: print("not a problem") zsh$> python3 1.py bug! ```
1 parent 1dee646 commit 19668be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,10 @@ def check_igc_tag_and_add_feature():
250250

251251

252252
def quote_path(path):
253+
if not path:
254+
return ""
253255
if platform.system() == "Windows":
254-
return f'"{path}"' if path else ""
256+
return f'"{path}"'
255257
return shlex.quote(path)
256258

257259
# Call the function to perform the check and add the feature

0 commit comments

Comments
 (0)