diff --git a/sycl/test-e2e/Compression/compression_multiple_tu.cpp b/sycl/test-e2e/Compression/compression_multiple_tu.cpp index 72eb3f0904790..0290c3771d6b7 100644 --- a/sycl/test-e2e/Compression/compression_multiple_tu.cpp +++ b/sycl/test-e2e/Compression/compression_multiple_tu.cpp @@ -2,10 +2,11 @@ // translation units, one compressed and one not compressed. // REQUIRES: zstd, linux -// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %T/kernel1.so -// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %T/kernel2.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %t.dir/kernel1.so +// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %t.dir/kernel2.so -// RUN: %{build} %T/kernel1.so %T/kernel2.so -o %t_compress.out +// RUN: %{build} %t.dir/kernel1.so %t.dir/kernel2.so -o %t_compress.out // RUN: %{run} %t_compress.out #if defined(ENABLE_KERNEL1) || defined(ENABLE_KERNEL2) #include diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp index 81775c4cae132..c3aecb7c782df 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp @@ -3,16 +3,18 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix} -// 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} -// 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} -// 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} +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix} // RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies -I %S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevice_a.lib%} \ +// RUN: %{%{tdir}/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%} +// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp index 70aa0a2f27251..356af2c2bf97f 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp @@ -1,19 +1,21 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on // Windows and Linux. +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%} +// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%} // RUN: %{build} --offload-new-driver -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/device_single.lib%} \ +// RUN: %{%{tdir}/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%} +// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp index 3dd217e0f9ea9..1a260b47dca62 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp @@ -3,16 +3,18 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix} +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix} // RUN: %clangxx -fsycl %{sycl_target_opts} -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel %S/Inputs/basic.cpp -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevice_a.lib%} \ +// RUN: %{%{tdir}/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%} +// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp index eb2e92b0e5826..e4efcee778496 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp @@ -6,20 +6,21 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp \ -// RUN: -o %T/libdevicecompress_d.%{dynamic_lib_suffix} +// RUN: -o %t.dir/libdevicecompress_d.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp \ -// RUN: %if windows %{%T/libdevicecompress_d.lib%} \ -// RUN: -o %T/libdevicecompress_c.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_d.lib%} \ +// RUN: -o %t.dir/libdevicecompress_c.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp \ -// RUN: %if windows %{%T/libdevicecompress_c.lib%} \ -// RUN: -o %T/libdevicecompress_b.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_c.lib%} \ +// RUN: -o %t.dir/libdevicecompress_b.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp \ -// RUN: %if windows %{%T/libdevicecompress_b.lib%} \ -// RUN: -o %T/libdevicecompress_a.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_b.lib%} \ +// RUN: -o %t.dir/libdevicecompress_a.%{dynamic_lib_suffix} // Compressed main executable, while dependencies are not compressed. @@ -27,8 +28,8 @@ // RUN: -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel \ // RUN: %S/Inputs/basic.cpp -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevicecompress_a.lib%} \ +// RUN: %{%t.dir/libdevicecompress_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp index 608189b83b3dd..ca5a9e0bcfa9e 100644 --- a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp @@ -1,19 +1,21 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on Windows // and Linux. +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} // RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%} +// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%} // RUN: %{build} -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/device_single.lib%} \ +// RUN: %{%{tdir}/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%} +// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp index 3fb5731bebe22..5c1fa78152a5b 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp @@ -14,10 +14,10 @@ // library is dlclosed and the device images are removed. // REQUIRES: linux +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so - -// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T -o %t1.out +// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir -o %t1.out // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp index b3ce5957963ca..fda61125c933f 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp @@ -9,8 +9,9 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so -// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%T +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so +// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp index 154abe72a74e7..3c7a522c2ac72 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp @@ -7,8 +7,9 @@ //===----------------------------------------------------------------------===// // REQUIRES: linux -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so -// RUN: %{build} -DBUILD_EXE -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so +// RUN: %{build} -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp index b5a883e8df97b..ff7d764992ed7 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp @@ -9,8 +9,9 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so -// RUN: %{build} --offload-compress -DBUILD_EXE -L%T -o %t1.out -l%basename_t_compress -Wl,-rpath=%T +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so +// RUN: %{build} --offload-compress -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t_compress -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp index 041226b108538..665e9ff2a6c91 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp @@ -8,7 +8,8 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: %{run} %t.out %T/output.ppm %S/golden_hw.ppm +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{run} %t.out %t.dir/output.ppm %S/golden_hw.ppm #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp index 07acb447f7dad..81e96903c1696 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp @@ -11,7 +11,8 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: %{run} %t.out %T/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0 +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{run} %t.out %t.dir/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0 #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp index c036d68a0a3d1..697b449805784 100644 --- a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp +++ b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp @@ -30,7 +30,7 @@ // // FIXME: is there better way to handle libraries loading than LD_PRELOAD? // There is no LIT substitution, which would point to a directory, where -// temporary files are located. There is %T, but it is marked as "deprecated, -// do not use" +// temporary files are located. + // RUN: env LD_PRELOAD=%t-lib-a.so %{run} %t-a.run // RUN: env LD_PRELOAD=%t-lib-o.so %{run} %t-o.run diff --git a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp index 18f8b3c596dc5..b9285ca681b22 100644 --- a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp +++ b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp @@ -1,10 +1,11 @@ // REQUIRES: level_zero && linux // build shared library -// RUN: %clangxx -fsycl -fPIC -shared -o %T/simple_lib.so %S/Inputs/simple_lib.cpp +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %clangxx -fsycl -fPIC -shared -o %t.dir/simple_lib.so %S/Inputs/simple_lib.cpp // build app -// RUN: %clangxx -DSO_PATH="%T/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%} +// RUN: %clangxx -DSO_PATH="%t.dir/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%} // RUN: %{run} %t.out // RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out diff --git a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp index c5a91b2ffb766..ab2aa14adfc8a 100644 --- a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp +++ b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp @@ -5,8 +5,8 @@ // DEFINE: %{shared_lib_ext} = %if windows %{dll%} %else %{so%} // clang-format off -// IMPORTANT -DSO_PATH='R"(%T)"' -// We need to capture %T, the build directory, in a string +// IMPORTANT -DSO_PATH='R"(%t.dir)"' +// We need to capture %t.dir, the build directory, in a string // and the normal STRINGIFY() macros hack won't work. // Because on Windows, the path delimiters are \, // which C++ preprocessor converts to escape sequences, @@ -16,15 +16,16 @@ // clang-format on // On Windows, the CI sometimes builds on one machine and runs on another. -// This means that %T might not be consistent between build and run. +// This means that %t.dir might not be consistent between build and run. // So we use %{run-aux} to perform ALL actions on the run machine // like we do for the AoT tests. - -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%T)"' -o %t.out %s -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %T/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %T/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %T/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: rm -rf %t.dir ; mkdir -p %t.dir +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%t.dir)"' -o %t.out %s + +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %t.dir/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %t.dir/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %t.dir/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp // RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out diff --git a/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp b/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp index 93aa4eb9712c6..5c0804c738bda 100644 --- a/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp +++ b/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp @@ -13,7 +13,7 @@ // UNSUPPORTED-INTENDED: IGC shader dump not available on Windows. // RUN: %{build} -o %t.out -// RUN: env IGC_DumpToCustomDir=%T.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %T.dump/ +// RUN: env IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %t.dump/ // clang-format off /* diff --git a/sycl/test-e2e/SharedLib/use_when_link.cpp b/sycl/test-e2e/SharedLib/use_when_link.cpp index e28ed008f02ea..9a09c50e31831 100644 --- a/sycl/test-e2e/SharedLib/use_when_link.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link.cpp @@ -1,11 +1,12 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t1.out -// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t2.out #include diff --git a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp index 3e13e9774e210..56af4fce3892c 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp @@ -3,12 +3,13 @@ // offload driver is enabled. Currently, new offload model supports only JIT. // TODO: Expand the test once AOT support for new offload model is ready. // -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %T/lib%basename_t.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %t.dir/lib%basename_t.so -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t.out -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t.out #include "use_when_link.cpp" diff --git a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp index cac0c124d66a3..9f39e00913f6a 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp @@ -1,11 +1,12 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild -// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir // RUN: env SYCL_UR_TRACE=2 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes=CHECK-LAST,CHECK --implicit-check-not=piProgramBuild #include diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp index 4d4910efa78e3..c64776f939e9f 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp @@ -1,8 +1,9 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T +// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir // RUN: %{compile} -o %t1.out -DRUN_FIRST // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp index bab8130bbab68..d0cfee7abe62e 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp @@ -1,8 +1,9 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: rm -rf %t.dir; mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T +// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir // RUN: %{compile} -o %t1.out -DRUN_FIRST // RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild