Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 60d9667

Browse files
committed
[SYCL] Enable tests outside Unix environment (part 1)
1 parent 7b17cc7 commit 60d9667

11 files changed

+40
-29
lines changed

SYCL/Basic/info_ocl_version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
3-
// RUN: env %CPU_RUN_PLACEHOLDER %t.out
4-
// RUN: env %GPU_RUN_PLACEHOLDER %t.out
5-
// RUN: env %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
66

77
//==--------info_ocl_version.cpp - SYCL objects get_info() test ------------==//
88
//

SYCL/Basic/parallel_for_range_roundup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
2+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %t.out %GPU_CHECK_PLACEHOLDER
33

44
#include <CL/sycl.hpp>
55

SYCL/Basic/queue/release.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER
3+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER
4+
// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER
55

66
#include <CL/sycl.hpp>
77
int main() {

SYCL/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ endif()
55
find_package(Threads REQUIRED)
66
set(SYCL_THREADS_LIB ${CMAKE_THREAD_LIBS_INIT})
77

8+
find_package(Python3 COMPONENTS Interpreter REQUIRED)
9+
10+
if (NOT TEST_SUITE_LIT)
11+
message(FATAL_ERROR "LIT was not found, specify TEST_SUITE_LIT")
12+
endif()
13+
14+
find_program(FILECHECK FileCheck)
15+
if (NOT FILECHECK)
16+
message(FATAL_ERROR "FileCheck utility was not found in PATH")
17+
endif()
18+
819
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in" "${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg")
920

1021
if(CHECK_SYCL_ALL)
@@ -20,7 +31,7 @@ if(CHECK_SYCL_ALL)
2031
string(REPLACE "," "_" TARGET check-sycl-${TARGET_BE}-${TARGET_DEVICES})
2132

2233
add_custom_target(${TARGET}
23-
COMMAND python3 ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
34+
COMMAND ${Python3_EXECUTABLE} ${TEST_SUITE_LIT} ${TEST_SUITE_LIT_FLAGS} --param sycl_be=${TARGET_BE} --param target_devices=${TARGET_DEVICES} .
2435
COMMENT "Running the SYCL tests for ${TARGET} backend"
2536
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
2637
DEPENDS ${TEST_SUITE_TARGETS}

SYCL/Plugin/enqueue-arg-order-buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Temporarily disabled due to CUDA context related failures.
22
// UNSUPPORTED: cuda
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
4-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
5-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER
5+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER
66

77
#include <CL/sycl.hpp>
88
#include <CL/sycl/accessor.hpp>

SYCL/Plugin/enqueue-arg-order-image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
44
// Native images are created with host pointers only with host unified memory
55
// support, enforce it for this test.
6-
// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
7-
// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
6+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER
7+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER
88

99
#include <CL/sycl.hpp>
1010
#include <CL/sycl/accessor.hpp>

SYCL/Scheduler/InOrderQueueDeps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
4-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
3+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
4+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5+
// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
66

77
// The tested functionality is disabled with Level Zero until it is supported by
88
// the plugin.

SYCL/Scheduler/ReleaseResourcesTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-dead-args-optimization %s -o %t.out
22
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
4-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
3+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
4+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5+
// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
66

77
//==------------------- ReleaseResourcesTests.cpp --------------------------==//
88
//

SYCL/SpecConstants/1.2.1/spec_const_redefine_accelerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
// XFAIL: opencl && accelerator
1717
// UNSUPPORTED: cuda || level_zero
1818
#include "spec_const_redefine_accelerator.cpp"
19-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
19+
// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out 2>&1 %ACC_CHECK_PLACEHOLDER

SYCL/Tracing/buffer_printers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
3-
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4-
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2+
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %GPU_CHECK_PLACEHOLDER
3+
// RUN: %CPU_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %CPU_CHECK_PLACEHOLDER
4+
// RUN: %ACC_RUN_PLACEHOLDER env SYCL_PI_TRACE=2 %t.out %ACC_CHECK_PLACEHOLDER
55

66
#include <CL/sycl.hpp>
77
#include <vector>

SYCL/lit.cfg.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@
214214

215215
found_at_least_one_device = False
216216

217-
host_run_substitute = "true"
218-
host_run_on_linux_substitute = "true "
217+
host_run_substitute = "echo "
218+
host_run_on_linux_substitute = "echo "
219219
host_check_substitute = ""
220220
host_check_on_linux_substitute = ""
221221
supported_device_types=['cpu', 'gpu', 'acc', 'host']
@@ -243,8 +243,8 @@
243243
config.substitutions.append( ('%HOST_CHECK_PLACEHOLDER', host_check_substitute) )
244244
config.substitutions.append( ('%HOST_CHECK_ON_LINUX_PLACEHOLDER', host_check_on_linux_substitute) )
245245

246-
cpu_run_substitute = "true"
247-
cpu_run_on_linux_substitute = "true "
246+
cpu_run_substitute = "echo "
247+
cpu_run_on_linux_substitute = "echo "
248248
cpu_check_substitute = ""
249249
cpu_check_on_linux_substitute = ""
250250

@@ -265,8 +265,8 @@
265265
config.substitutions.append( ('%CPU_CHECK_PLACEHOLDER', cpu_check_substitute) )
266266
config.substitutions.append( ('%CPU_CHECK_ON_LINUX_PLACEHOLDER', cpu_check_on_linux_substitute) )
267267

268-
gpu_run_substitute = "true"
269-
gpu_run_on_linux_substitute = "true "
268+
gpu_run_substitute = "echo "
269+
gpu_run_on_linux_substitute = "echo "
270270
gpu_check_substitute = ""
271271
gpu_l0_check_substitute = ""
272272
gpu_check_on_linux_substitute = ""
@@ -294,7 +294,7 @@
294294
config.substitutions.append( ('%GPU_L0_CHECK_PLACEHOLDER', gpu_l0_check_substitute) )
295295
config.substitutions.append( ('%GPU_CHECK_ON_LINUX_PLACEHOLDER', gpu_check_on_linux_substitute) )
296296

297-
acc_run_substitute = "true"
297+
acc_run_substitute = "echo "
298298
acc_check_substitute = ""
299299
if 'acc' in config.target_devices.split(','):
300300
found_at_least_one_device = True

0 commit comments

Comments
 (0)