Skip to content

Commit bc9d7bb

Browse files
committed
Add driver forwarding test
Signed-off-by: Lukas Sommer <[email protected]>
1 parent 3ce13f7 commit bc9d7bb

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
///
2+
/// Perform driver test for SYCL RTC mode.
3+
///
4+
5+
/// Check that the '-fsycl-rtc-mode' is correctly forwarded to the device
6+
/// compilation and only to the device compilation.
7+
8+
// RUN: %clangxx -fsycl -fsycl-rtc-mode --no-offload-new-driver %s -### 2>&1 \
9+
// RUN: | FileCheck %s
10+
11+
// RUN: %clangxx -fsycl -fsycl-rtc-mode --offload-new-driver %s -### 2>&1 \
12+
// RUN: | FileCheck %s
13+
14+
// CHECK: clang{{.*}} "-fsycl-is-device"
15+
// CHECK-SAME: -fsycl-rtc-mode
16+
// CHECK: clang{{.*}} "-fsycl-is-host"
17+
// CHECK-NOT: -fsycl-rtc-mode
18+
19+
20+
/// Check that the '-fno-sycl-rtc-mode' is correctly forwarded to the device
21+
/// compilation and only to the device compilation.
22+
23+
// RUN: %clangxx -fsycl -fno-sycl-rtc-mode --no-offload-new-driver %s -### 2>&1 \
24+
// RUN: | FileCheck %s --check-prefix=NEGATIVE
25+
26+
// RUN: %clangxx -fsycl -fno-sycl-rtc-mode --offload-new-driver %s -### 2>&1 \
27+
// RUN: | FileCheck %s --check-prefix=NEGATIVE
28+
29+
// NEGATIVE: clang{{.*}} "-fsycl-is-device"
30+
// NEGATIVE-SAME: -fno-sycl-rtc-mode
31+
// NEGATIVE: clang{{.*}} "-fsycl-is-host"
32+
// NEGATIVE-NOT: -fsycl-rtc-mode

0 commit comments

Comments
 (0)