Skip to content

Commit 40d80c0

Browse files
[SYCL][NFC] Use unique (or no at all) output files in LIT tests (#7872)
This fixes sporadic issue with `check-sycl` on Windows. Apparently we had a number of tests, which didn't specify `-o %t.out` and it caused some tests to write to the same default `a.exe` and fail with error like: ``` LINK : fatal error LNK1104: cannot open file 'a.exe' ``` To resolve this, switch most of such tests to use `-fsyntax-only` or explicitly added `-o %t.out` to prevent possible races. "bad" tests were discovered using `grep -rnP 'clangxx(?!.*\-o)' sycl/test/`
1 parent 017bcdc commit 40d80c0

19 files changed

+30
-28
lines changed

sycl/test/abi/layout_accessors_host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
22
// REQUIRES: linux
33
// UNSUPPORTED: libcxx
44

sycl/test/abi/layout_array.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
2-
// RUN: %clangxx -fsycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
2+
// RUN: %clangxx -fsycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
33
// REQUIRES: linux
44
// UNSUPPORTED: libcxx
55

sycl/test/abi/layout_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
22
// REQUIRES: linux
33
// UNSUPPORTED: libcxx
44

sycl/test/abi/layout_handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
22
// REQUIRES: linux
33
// UNSUPPORTED: libcxx
44

sycl/test/abi/layout_image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -fsyntax-only -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
22
// REQUIRES: linux
33
// UNSUPPORTED: libcxx
44

sycl/test/abi/layout_vec.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
2-
// RUN: %clangxx -fsycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
2+
// RUN: %clangxx -fsycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts %s -o %t.out | FileCheck %s
33
// REQUIRES: linux
44
// UNSUPPORTED: libcxx
55

sycl/test/abi/vtable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-vtable-layouts %s | FileCheck %s
1+
// RUN: %clangxx -fsycl -c -fno-color-diagnostics -Xclang -fdump-vtable-layouts %s -o %t.out | FileCheck %s
22
// REQUIRES: linux
33

44
#include <sycl/sycl.hpp>

sycl/test/basic_tests/accessor/iterator-member-types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c %s
1+
// RUN: %clangxx -fsycl -fsyntax-only %s
22
//
33
// Purpose of this test is to check that [accessor|host_accessor]::iterator and
44
// ::const_iterator are aliased to the correct type.

sycl/test/basic_tests/boost_mp11_import_sanity_check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// http://www.boost.org/LICENSE_1_0.txt
1717
//===----------------------------------------------------------------------===//
1818

19-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -c %s
19+
// RUN: %clangxx -fsycl -fsyntax-only -fsycl-targets=%sycl_triple %s
2020

2121
// This is a sanity check test to verify that the automatic boost/mp11 import
2222
// into SYCL is not badly broken.

sycl/test/basic_tests/interop-backend-traits.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clangxx -fsycl -DUSE_OPENCL %s
2-
// RUN: %clangxx %fsycl-host-only -DUSE_L0 %s
3-
// RUN: %clangxx -fsycl -DUSE_CUDA %s
4-
// RUN: %clangxx -fsycl -DUSE_HIP %s
5-
// RUN: %clangxx -fsycl -DUSE_CUDA_EXPERIMENTAL %s
1+
// RUN: %clangxx -fsycl -fsyntax-only -DUSE_OPENCL %s
2+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -DUSE_L0 %s
3+
// RUN: %clangxx -fsycl -fsyntax-only -DUSE_CUDA %s
4+
// RUN: %clangxx -fsycl -fsyntax-only -DUSE_HIP %s
5+
// RUN: %clangxx -fsycl -fsyntax-only -DUSE_CUDA_EXPERIMENTAL %s
66

77
#ifdef USE_OPENCL
88
#include <CL/cl.h>

0 commit comments

Comments
 (0)