Skip to content

Commit 06bf237

Browse files
[SYCL][E2E] Redirect output to /dev/null instead of stdout (#18937)
Redirecting output to stdout is not working and LIT is instead creating a binary file named `-`. Thus, redirecting output to `/dev/null`. os.devnull equals `/dev/null` on POSIX and 'null' on Windows --------- Co-authored-by: Copilot <[email protected]>
1 parent bef98c9 commit 06bf237

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ def open_check_file(file_name):
316316
# check if the compiler was built in NDEBUG configuration
317317
has_ndebug = False
318318
ps = subprocess.Popen(
319-
[config.dpcpp_compiler, "-mllvm", "-debug", "-x", "c", "-", "-S", "-o", "-"],
319+
[config.dpcpp_compiler, "-mllvm", "-debug", "-x", "c", "-", "-S", "-o", os.devnull],
320320
stdin=subprocess.PIPE,
321-
stdout=subprocess.DEVNULL,
322321
stderr=subprocess.PIPE,
323322
)
324323
_ = ps.communicate(input=b"int main(){}\n")
@@ -426,10 +425,9 @@ def open_check_file(file_name):
426425
"c++",
427426
"-",
428427
"-o",
429-
"-",
428+
os.devnull,
430429
],
431430
stdin=subprocess.PIPE,
432-
stdout=subprocess.DEVNULL,
433431
stderr=subprocess.PIPE,
434432
)
435433
op = ps.communicate(input=b"")

0 commit comments

Comments
 (0)