Skip to content

Commit 542ef93

Browse files
committed
[SYCL][LIT] Add target to run SYCL LIT tests on OpenCL back-end
1 parent 363ad5f commit 542ef93

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

sycl/test/CMakeLists.txt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,14 @@ list(APPEND SYCL_DEPLOY_TEST_DEPS
4242
deploy-sycl-toolchain
4343
)
4444

45-
add_lit_testsuite(check-sycl "Running the SYCL regression tests"
46-
${CMAKE_CURRENT_BINARY_DIR}
47-
ARGS ${RT_TEST_ARGS}
48-
PARAMS "SYCL_BE=PI_OPENCL"
49-
DEPENDS ${SYCL_TEST_DEPS}
50-
)
51-
5245
add_lit_testsuite(check-sycl-deploy "Running the SYCL regression tests"
5346
${CMAKE_CURRENT_BINARY_DIR}
5447
ARGS ${DEPLOY_RT_TEST_ARGS}
5548
PARAMS "SYCL_BE=PI_OPENCL"
5649
DEPENDS ${SYCL_DEPLOY_TEST_DEPS}
5750
EXCLUDE_FROM_CHECK_ALL
5851
)
59-
set_target_properties(check-sycl PROPERTIES FOLDER "SYCL tests")
52+
set_target_properties(check-sycl-deploy PROPERTIES FOLDER "SYCL tests")
6053

6154
add_lit_testsuites(SYCL ${CMAKE_CURRENT_SOURCE_DIR}
6255
DEPENDS ${SYCL_TEST_DEPS}
@@ -76,16 +69,29 @@ add_lit_target(check-sycl-inline-asm
7669
PARAMS "SYCL_BE=PI_OPENCL"
7770
DEPENDS ${SYCL_TEST_DEPS}
7871
)
72+
set_target_properties(check-sycl-inline-asm PROPERTIES FOLDER "SYCL tests")
7973

80-
add_lit_testsuite(check-level0 "Running the SYCL regression tests for Level Zero"
74+
add_lit_testsuite(check-sycl-opencl "Running the SYCL regression tests for OpenCL"
75+
${CMAKE_CURRENT_BINARY_DIR}
76+
ARGS ${RT_TEST_ARGS}
77+
PARAMS "SYCL_BE=PI_OPENCL"
78+
DEPENDS ${SYCL_TEST_DEPS}
79+
EXCLUDE_FROM_CHECK_ALL
80+
)
81+
set_target_properties(check-sycl-opencl PROPERTIES FOLDER "SYCL tests")
82+
83+
add_lit_testsuite(check-sycl-level0 "Running the SYCL regression tests for Level Zero"
8184
${CMAKE_CURRENT_BINARY_DIR}
8285
ARGS ${RT_TEST_ARGS}
8386
PARAMS "SYCL_BE=PI_LEVEL0"
8487
DEPENDS ${SYCL_TEST_DEPS}
8588
EXCLUDE_FROM_CHECK_ALL
8689
)
90+
set_target_properties(check-sycl-level0 PROPERTIES FOLDER "SYCL tests")
8791

88-
add_dependencies(check-sycl check-level0)
92+
add_custom_target(check-sycl)
93+
add_dependencies(check-sycl check-sycl-opencl check-sycl-level0)
94+
set_target_properties(check-sycl PROPERTIES FOLDER "SYCL tests")
8995

9096
if(SYCL_BUILD_PI_CUDA)
9197
add_lit_testsuite(check-sycl-cuda "Running the SYCL regression tests for CUDA"
@@ -94,9 +100,10 @@ if(SYCL_BUILD_PI_CUDA)
94100
PARAMS "SYCL_BE=PI_CUDA"
95101
DEPENDS ${SYCL_TEST_DEPS}
96102
)
97-
98103
set_target_properties(check-sycl-cuda PROPERTIES FOLDER "SYCL CUDA tests")
99104

105+
add_dependencies(check-sycl check-sycl-cuda)
106+
100107
add_lit_testsuites(SYCL-CUDA ${CMAKE_CURRENT_SOURCE_DIR}
101108
PARAMS "SYCL_BE=PI_CUDA"
102109
DEPENDS ${SYCL_TEST_DEPS}

0 commit comments

Comments
 (0)