Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sycl/cmake/modules/AddSYCLUnitTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ endfunction()
#
# Will compile the list of files together to create two builds, with and without
# the SYCL preview features enabled.
# Produces two binaries, named `basename(test_name_prefix_non_preview)` and `basename(test_name_prefix_preview)`
# Produces two binaries, named `basename(test_name_prefix_Non_Preview_Tests)` and `basename(test_name_prefix_Preview_Tests)`
# Note: in case of changing test names below, please also adjust the test suffix
# in sycl/test/Unit/lit.cfg.py in the line which looks like this:
# `config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, <...>)`
macro(add_sycl_unittest test_name_prefix link_variant)
add_sycl_unittest_internal(${test_name_prefix}_non_preview ${link_variant} FALSE ${ARGN})
add_sycl_unittest_internal(${test_name_prefix}_preview ${link_variant} TRUE ${ARGN})
add_sycl_unittest_internal(${test_name_prefix}_Non_Preview_Tests ${link_variant} FALSE ${ARGN})
add_sycl_unittest_internal(${test_name_prefix}_Preview_Tests ${link_variant} TRUE ${ARGN})
endmacro()
7 changes: 6 additions & 1 deletion sycl/test/Unit/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
config.test_source_root = config.test_exec_root

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests")
# TODO: CMPLRTST-28093: currently only non-preview SYCL unit tests are executed
# as part of `check-sycl` and `check-all`. Change the second argument to just
# "Tests" after the concurrency problem with non-preview and preview versions of
# SYCL unit tests is fixed, so both non-review and preview versions of SYCL unit
# tests will be executed as part of `check-sycl` and `check-all`.
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Non_Preview_Tests")

# Propagate the temp directory. Windows requires this because it uses \Windows\
# if none of these are present.
Expand Down
4 changes: 2 additions & 2 deletions sycl/unittests/compression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_sycl_unittest(CompressionTests OBJECT
CompressionTests.cpp
)
target_compile_definitions(CompressionTests_non_preview PRIVATE SYCL_RT_ZSTD_AVAILABLE)
target_compile_definitions(CompressionTests_preview PRIVATE SYCL_RT_ZSTD_AVAILABLE __INTEL_PREVIEW_BREAKING_CHANGES)
target_compile_definitions(CompressionTests_Non_Preview_Tests PRIVATE SYCL_RT_ZSTD_AVAILABLE)
target_compile_definitions(CompressionTests_Preview_Tests PRIVATE SYCL_RT_ZSTD_AVAILABLE __INTEL_PREVIEW_BREAKING_CHANGES)
4 changes: 2 additions & 2 deletions sycl/unittests/kernel-and-program/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ add_sycl_unittest(KernelAndProgramTests OBJECT
KernelArgs.cpp
KernelInfoShortcuts.cpp
)
target_compile_definitions(KernelAndProgramTests_non_preview PRIVATE __SYCL_INTERNAL_API)
target_compile_definitions(KernelAndProgramTests_preview PRIVATE __SYCL_INTERNAL_API __INTEL_PREVIEW_BREAKING_CHANGES)
target_compile_definitions(KernelAndProgramTests_Non_Preview_Tests PRIVATE __SYCL_INTERNAL_API)
target_compile_definitions(KernelAndProgramTests_Preview_Tests PRIVATE __SYCL_INTERNAL_API __INTEL_PREVIEW_BREAKING_CHANGES)
8 changes: 4 additions & 4 deletions sycl/unittests/pipes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_sycl_unittest(PipeTests OBJECT
host_pipe_registration.cpp
)

add_dependencies(PipeTests_non_preview sycl)
target_include_directories(PipeTests_non_preview PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(PipeTests_preview sycl)
target_include_directories(PipeTests_preview PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(PipeTests_Non_Preview_Tests sycl)
target_include_directories(PipeTests_Non_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(PipeTests_Preview_Tests sycl)
target_include_directories(PipeTests_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir})
8 changes: 4 additions & 4 deletions sycl/unittests/ur/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_sycl_unittest(UrTests OBJECT
UrUtility.cpp
)

add_dependencies(UrTests_non_preview sycl)
target_include_directories(UrTests_non_preview PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(UrTests_preview sycl)
target_include_directories(UrTests_preview PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(UrTests_Non_Preview_Tests sycl)
target_include_directories(UrTests_Non_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir})
add_dependencies(UrTests_Preview_Tests sycl)
target_include_directories(UrTests_Preview_Tests PRIVATE SYSTEM ${sycl_inc_dir})
4 changes: 2 additions & 2 deletions sycl/unittests/xpti_trace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ add_sycl_unittest(XptiTraceTests OBJECT
NodeCreation.cpp
QueueIDCheck.cpp
)
target_link_libraries(XptiTraceTests_non_preview PRIVATE xpti xptitest_subscriber)
target_link_libraries(XptiTraceTests_preview PRIVATE xpti xptitest_subscriber)
target_link_libraries(XptiTraceTests_Non_Preview_Tests PRIVATE xpti xptitest_subscriber)
target_link_libraries(XptiTraceTests_Preview_Tests PRIVATE xpti xptitest_subscriber)