Skip to content

Commit 3adefc4

Browse files
committed
[NFC][E2E] Remove usage of %T in tests
%T support is removed in community llvm/llvm-project@7ff6973f1 Use %t.dir instead, create the dir manually.
1 parent dfd72fc commit 3adefc4

21 files changed

+85
-67
lines changed

sycl/test-e2e/Compression/compression_multiple_tu.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// translation units, one compressed and one not compressed.
33
// REQUIRES: zstd, linux
44

5-
// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %T/kernel1.so
6-
// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %T/kernel2.so
5+
// RUN: mkdir -p %t.dir
6+
// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %t.dir/kernel1.so
7+
// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %t.dir/kernel2.so
78

8-
// RUN: %{build} %T/kernel1.so %T/kernel2.so -o %t_compress.out
9+
// RUN: %{build} %t.dir/kernel1.so %t.dir/kernel2.so -o %t_compress.out
910
// RUN: %{run} %t_compress.out
1011
#if defined(ENABLE_KERNEL1) || defined(ENABLE_KERNEL2)
1112
#include <sycl/builtins.hpp>

sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
44
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}
55

6-
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix}
7-
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix}
8-
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix}
9-
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix}
6+
// RUN: mkdir -p %t.dir
7+
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix}
8+
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix}
9+
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix}
10+
// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix}
1011

1112
// RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies -I %S/Inputs -o %t.out \
1213
// RUN: %if windows \
13-
// RUN: %{%T/libdevice_a.lib%} \
14+
// RUN: %{%t.dir/libdevice_a.lib%} \
1415
// RUN: %else \
15-
// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%}
16+
// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%}
1617

1718
// RUN: %{run} %t.out
1819

sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
// Test -fsycl-allow-device-image-dependencies with a single dynamic library on
22
// Windows and Linux.
33

4+
// RUN: mkdir -p %t.dir
45
// RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \
56
// RUN: %S/Inputs/a.cpp \
67
// RUN: %S/Inputs/b.cpp \
78
// RUN: %S/Inputs/c.cpp \
89
// RUN: %S/Inputs/d.cpp \
910
// RUN: %S/Inputs/wrapper.cpp \
10-
// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%}
11+
// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%}
1112

1213
// RUN: %{build} --offload-new-driver -I%S/Inputs -o %t.out \
1314
// RUN: %if windows \
14-
// RUN: %{%T/device_single.lib%} \
15+
// RUN: %{%t.dir/device_single.lib%} \
1516
// RUN: %else \
16-
// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%}
17+
// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%}
1718

1819
// RUN: %{run} %t.out
1920

sycl/test-e2e/DeviceImageDependencies/dynamic.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
44
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}
55

6-
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix}
7-
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix}
8-
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix}
9-
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix}
6+
// RUN: mkdir -p %t.dir
7+
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix}
8+
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix}
9+
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix}
10+
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix}
1011

1112
// RUN: %clangxx -fsycl %{sycl_target_opts} -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel %S/Inputs/basic.cpp -o %t.out \
1213
// RUN: %if windows \
13-
// RUN: %{%T/libdevice_a.lib%} \
14+
// RUN: %{%t.dir/libdevice_a.lib%} \
1415
// RUN: %else \
15-
// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%}
16+
// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%}
1617

1718
// RUN: %{run} %t.out
1819

sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,30 @@
66
// DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %}
77
// DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%}
88

9+
// RUN: mkdir -p %t.dir
910
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp \
10-
// RUN: -o %T/libdevicecompress_d.%{dynamic_lib_suffix}
11+
// RUN: -o %t.dir/libdevicecompress_d.%{dynamic_lib_suffix}
1112

1213
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp \
13-
// RUN: %if windows %{%T/libdevicecompress_d.lib%} \
14-
// RUN: -o %T/libdevicecompress_c.%{dynamic_lib_suffix}
14+
// RUN: %if windows %{%t.dir/libdevicecompress_d.lib%} \
15+
// RUN: -o %t.dir/libdevicecompress_c.%{dynamic_lib_suffix}
1516

1617
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp \
17-
// RUN: %if windows %{%T/libdevicecompress_c.lib%} \
18-
// RUN: -o %T/libdevicecompress_b.%{dynamic_lib_suffix}
18+
// RUN: %if windows %{%t.dir/libdevicecompress_c.lib%} \
19+
// RUN: -o %t.dir/libdevicecompress_b.%{dynamic_lib_suffix}
1920

2021
// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp \
21-
// RUN: %if windows %{%T/libdevicecompress_b.lib%} \
22-
// RUN: -o %T/libdevicecompress_a.%{dynamic_lib_suffix}
22+
// RUN: %if windows %{%t.dir/libdevicecompress_b.lib%} \
23+
// RUN: -o %t.dir/libdevicecompress_a.%{dynamic_lib_suffix}
2324

2425
// Compressed main executable, while dependencies are not compressed.
2526

2627
// RUN: %clangxx -fsycl --offload-compress %{sycl_target_opts} \
2728
// RUN: -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel \
2829
// RUN: %S/Inputs/basic.cpp -o %t.out \
2930
// RUN: %if windows \
30-
// RUN: %{%T/libdevicecompress_a.lib%} \
31+
// RUN: %{%t.dir/libdevicecompress_a.lib%} \
3132
// RUN: %else \
32-
// RUN: %{-L%T -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%T%}
33+
// RUN: %{-L%t.dir -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%t.dir%}
3334

3435
// RUN: %{run} %t.out

sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
// Test -fsycl-allow-device-image-dependencies with a single dynamic library on Windows
22
// and Linux.
33

4+
// RUN: mkdir -p %t.dir
45
// RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \
56
// RUN: %S/Inputs/a.cpp \
67
// RUN: %S/Inputs/b.cpp \
78
// RUN: %S/Inputs/c.cpp \
89
// RUN: %S/Inputs/d.cpp \
910
// RUN: %S/Inputs/wrapper.cpp \
10-
// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%}
11+
// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%}
1112

1213
// RUN: %{build} -I%S/Inputs -o %t.out \
1314
// RUN: %if windows \
14-
// RUN: %{%T/device_single.lib%} \
15+
// RUN: %{%t.dir/device_single.lib%} \
1516
// RUN: %else \
16-
// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%}
17+
// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%}
1718

1819
// RUN: %{run} %t.out
1920

sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// library is dlclosed and the device images are removed.
1515

1616
// REQUIRES: linux
17+
// RUN: mkdir -p %t.dir
18+
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so
1719

18-
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
19-
20-
// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T -o %t1.out
20+
// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir -o %t1.out
2121

2222
// RUN: %{run} %t1.out
2323

sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
// Check bfloat16 devicelib device image compression.
1010

1111
// REQUIRES: linux, zstd
12-
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so
13-
// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%T
12+
// RUN: mkdir -p %t.dir
13+
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so
14+
// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%t.dir
1415
// RUN: %{run} %t1.out
1516

1617
// UNSUPPORTED: target-nvidia || target-amd

sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
//===----------------------------------------------------------------------===//
88

99
// REQUIRES: linux
10-
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so
11-
// RUN: %{build} -DBUILD_EXE -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T
10+
// RUN: mkdir -p %t.dir
11+
// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so
12+
// RUN: %{build} -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir
1213
// RUN: %{run} %t1.out
1314

1415
// UNSUPPORTED: target-nvidia || target-amd

sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
// Check bfloat16 devicelib device image compression.
1010

1111
// REQUIRES: linux, zstd
12-
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so
13-
// RUN: %{build} --offload-compress -DBUILD_EXE -L%T -o %t1.out -l%basename_t_compress -Wl,-rpath=%T
12+
// RUN: mkdir -p %t.dir
13+
// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so
14+
// RUN: %{build} --offload-compress -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t_compress -Wl,-rpath=%t.dir
1415
// RUN: %{run} %t1.out
1516

1617
// UNSUPPORTED: target-nvidia || target-amd

0 commit comments

Comments
 (0)