Skip to content

Commit d00afbf

Browse files
[SYCL][Test E2E] Fix tests not using %{run*} (#9524)
These substitution/expansion must be used in order to run the test through run_launcher when one is specified in llvm-lit parameters.
1 parent fd0c313 commit d00afbf

File tree

12 files changed

+39
-40
lines changed

12 files changed

+39
-40
lines changed

sycl/test-e2e/Basic/library_loading.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: linux
22
// RUN: %{build} -o %t.out
3-
// RUN: env SYCL_PI_TRACE=-1 %t.out &> %t_trace_no_filter.txt || true
3+
// RUN: env SYCL_PI_TRACE=-1 %{run-unfiltered-devices} %t.out &> %t_trace_no_filter.txt || true
44
// RUN: FileCheck --input-file=%t_trace_no_filter.txt --check-prefix=CHECK-NO-FILTER %s
5-
// RUN: env SYCL_PI_TRACE=-1 ONEAPI_DEVICE_SELECTOR='esimd_emulator:*' %t.out &> %t_trace_esimd_filter.txt || true
5+
// RUN: env SYCL_PI_TRACE=-1 ONEAPI_DEVICE_SELECTOR='esimd_emulator:*' %{run-unfiltered-devices} %t.out &> %t_trace_esimd_filter.txt || true
66
// RUN: FileCheck --input-file=%t_trace_esimd_filter.txt --check-prefix=CHECK-ESIMD-FILTER %s
77
// Checks pi traces on library loading
88

sycl/test-e2e/Basic/query_emulate_subdevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %{build} -o %t.out
22
// RUN: env CreateMultipleSubDevices=2 EnableTimestampPacket=1 \
3-
// RUN: NEOReadDebugKeys=1 ONEAPI_DEVICE_SELECTOR="*:gpu" %t.out
3+
// RUN: NEOReadDebugKeys=1 ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t.out
44

55
// UNSUPPORTED: gpu-intel-dg1,hip
66
// Temporarily disable on L0 due to fails in CI

sycl/test-e2e/Config/allowlist.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// REQUIRES: cpu
22
// RUN: %{build} -o %t.out
33
//
4-
// RUN: env PRINT_DEVICE_INFO=1 %t.out > %t1.conf
5-
// RUN: env TEST_DEVICE_AVAILABLE=1 env SYCL_CONFIG_FILE_NAME=%t1.conf %t.out
4+
// RUN: env PRINT_DEVICE_INFO=1 %{run-unfiltered-devices} %t.out > %t1.conf
5+
// RUN: env TEST_DEVICE_AVAILABLE=1 env SYCL_CONFIG_FILE_NAME=%t1.conf %{run-unfiltered-devices} %t.out
66
//
7-
// RUN: env PRINT_PLATFORM_INFO=1 %t.out > %t2.conf
8-
// RUN: env TEST_DEVICE_AVAILABLE=1 env SYCL_CONFIG_FILE_NAME=%t2.conf %t.out
7+
// RUN: env PRINT_PLATFORM_INFO=1 %{run-unfiltered-devices} %t.out > %t2.conf
8+
// RUN: env TEST_DEVICE_AVAILABLE=1 env SYCL_CONFIG_FILE_NAME=%t2.conf %{run-unfiltered-devices} %t.out
99
//
10-
// RUN: env TEST_DEVICE_IS_NOT_AVAILABLE=1 env SYCL_DEVICE_ALLOWLIST="PlatformName:{{SUCH NAME DOESN'T EXIST}}" %t.out
11-
// RUN: env TEST_INCORRECT_VALUE=1 env SYCL_DEVICE_ALLOWLIST="IncorrectKey:{{.*}}" %t.out
10+
// RUN: env TEST_DEVICE_IS_NOT_AVAILABLE=1 env SYCL_DEVICE_ALLOWLIST="PlatformName:{{SUCH NAME DOESN'T EXIST}}" %{run-unfiltered-devices} %t.out
11+
// RUN: env TEST_INCORRECT_VALUE=1 env SYCL_DEVICE_ALLOWLIST="IncorrectKey:{{.*}}" %{run-unfiltered-devices} %t.out
1212

1313
#include <algorithm>
1414
#include <cstdlib>

sycl/test-e2e/DeprecatedFeatures/deprecated_sycl_device_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: env SYCL_DEVICE_FILTER='*' %t.out &> %t.log
2+
// RUN: env SYCL_DEVICE_FILTER='*' %{run-unfiltered-devices} %t.out &> %t.log
33
// RUN: FileCheck %s < %t.log
44
//
55
// CHECK: WARNING: The enviroment variable SYCL_DEVICE_FILTER is deprecated.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// REQUIRES: level_zero
22
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %S/Inputs/trivial.cpp -o %t.out
3-
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero %t.out
4-
// XFAIL: *
53

64
// Calling ONEAPI_DEVICE_SELECTOR with a backend and no device should result in
7-
// an error.
5+
// an error.
6+
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero %{run-unfiltered-devices} not %t.out

sycl/test-e2e/OneapiDeviceSelector/case_sensitivity.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// does not actually require OpenCL or GPU. Just testing parsing.
33

44
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %S/Inputs/trivial.cpp -o %t.out
5-
// RUN: env ONEAPI_DEVICE_SELECTOR="OPENCL:*" %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" %t.out
7-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:GPU" %t.out
8-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %t.out
5+
// RUN: env ONEAPI_DEVICE_SELECTOR="OPENCL:*" %{run-unfiltered-devices} %t.out
6+
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" %{run-unfiltered-devices} %t.out
7+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:GPU" %{run-unfiltered-devices} %t.out
8+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t.out

sycl/test-e2e/OneapiDeviceSelector/cuda_top.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: cuda,gpu
22
// RUN: %{build} -o %t.out
3-
// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %t.out
4-
// RUN: env ONEAPI_DEVICE_SELECTOR='cuda:0' %t.out
5-
// RUN: env ONEAPI_DEVICE_SELECTOR="cuda:*" %t.out
3+
// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %{run-unfiltered-devices} %t.out
4+
// RUN: env ONEAPI_DEVICE_SELECTOR='cuda:0' %{run-unfiltered-devices} %t.out
5+
// RUN: env ONEAPI_DEVICE_SELECTOR="cuda:*" %{run-unfiltered-devices} %t.out
66

77
// At this time, CUDA only has one device (GPU). So this is easy to accept CUDA
88
// and GPU and reject anything else. This test is just testing top level
@@ -49,4 +49,4 @@ int main() {
4949
}
5050

5151
return 0;
52-
}
52+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %S/Inputs/trivial.cpp -o %t.out
3-
// RUN: env ONEAPI_DEVICE_SELECTOR="macaroni:*"" %t.out
3+
// RUN: env ONEAPI_DEVICE_SELECTOR="macaroni:*"" %{run-unfiltered-devices} %t.out
44
// XFAIL: *
55

66
// Calling ONEAPI_DEVICE_SELECTOR with an illegal backend should result in an
7-
// error.
7+
// error.

sycl/test-e2e/OneapiDeviceSelector/level_zero_top.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: level_zero,gpu
22
// RUN: %{build} -o %t.out
3-
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %t.out
4-
// RUN: env ONEAPI_DEVICE_SELECTOR='level_zero:0' %t.out
5-
// RUN: env ONEAPI_DEVICE_SELECTOR="level_zero:*" %t.out
3+
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run-unfiltered-devices} %t.out
4+
// RUN: env ONEAPI_DEVICE_SELECTOR='level_zero:0' %{run-unfiltered-devices} %t.out
5+
// RUN: env ONEAPI_DEVICE_SELECTOR="level_zero:*" %{run-unfiltered-devices} %t.out
66

77
// At this time, LevelZero only has one device (GPU). So this is easy to accept
88
// L0 and GPU and reject anything else. This test is just testing top level
@@ -49,4 +49,4 @@ int main() {
4949
}
5050

5151
return 0;
52-
}
52+
}

sycl/test-e2e/OneapiDeviceSelector/no_duplicate_devices.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: opencl, cpu
22
// RUN: %{build} -o %t.out
3-
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" %t.out 1 &> tmp.txt
4-
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*,cpu" cat tmp.txt | %t.out
5-
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:cpu,cpu" cat tmp.txt | %t.out
3+
// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" %{run-unfiltered-devices} %t.out 1 &> tmp.txt
4+
// RUN: cat tmp.txt | env ONEAPI_DEVICE_SELECTOR="opencl:*,cpu" %{run-unfiltered-devices} %t.out
5+
// RUN: cat tmp.txt | env ONEAPI_DEVICE_SELECTOR="opencl:cpu,cpu" %{run-unfiltered-devices} %t.out
66

77
// on the first run we pass a dummy arg to the app. On seeing that, we count the
88
// number of CPU devices and output it. That is piped to a file. On subsequent

sycl/test-e2e/OneapiDeviceSelector/sub-devices.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
// select sub-devices
1212
// ONEAPI_DEVICE_SELECTOR=(any backend):(any
1313
// device).(all-the-sub-devices).(all-sub-sub-devices)
14-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:*.*" %t.out
15-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:*.*.*" %t.out
14+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:*.*" %{run-unfiltered-devices} %t.out
15+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:*.*.*" %{run-unfiltered-devices} %t.out
1616

1717
// select root devices and pass arg to test so it knows.
18-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %t.out 1
19-
// RUN: %t.out 1
18+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:gpu" %{run-unfiltered-devices} %t.out 1
19+
// RUN: %{run-unfiltered-devices} %t.out 1
2020

2121
#include <sycl/sycl.hpp>
2222
using namespace sycl;
@@ -76,4 +76,4 @@ int main(int Argc, const char *Argv[]) {
7676
}
7777
}
7878
return 0;
79-
}
79+
}

sycl/test-e2e/Regression/device_num.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -o %t.out
2-
// RUN: env PRINT_FULL_DEVICE_INFO=1 %t.out > %t1.conf
3-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:0" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %t.out
4-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:1" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %t.out
5-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:2" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %t.out
6-
// RUN: env ONEAPI_DEVICE_SELECTOR="*:3" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %t.out
2+
// RUN: env PRINT_FULL_DEVICE_INFO=1 %{run-unfiltered-devices} %t.out > %t1.conf
3+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:0" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %{run-unfiltered-devices} %t.out
4+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:1" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %{run-unfiltered-devices} %t.out
5+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:2" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %{run-unfiltered-devices} %t.out
6+
// RUN: env ONEAPI_DEVICE_SELECTOR="*:3" env TEST_DEV_CONFIG_FILE_NAME=%t1.conf %{run-unfiltered-devices} %t.out
77

88
// Temporarily disable on L0 and HIP due to fails in CI
99
// UNSUPPORTED: level_zero, hip

0 commit comments

Comments
 (0)