diff --git a/sycl/cmake/modules/AddSYCLUnitTest.cmake b/sycl/cmake/modules/AddSYCLUnitTest.cmake index 2b4a10ea9f2a8..0b7a820452004 100644 --- a/sycl/cmake/modules/AddSYCLUnitTest.cmake +++ b/sycl/cmake/modules/AddSYCLUnitTest.cmake @@ -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() diff --git a/sycl/test/Unit/lit.cfg.py b/sycl/test/Unit/lit.cfg.py index e2e95da2d95e6..6aaf1125f15e3 100644 --- a/sycl/test/Unit/lit.cfg.py +++ b/sycl/test/Unit/lit.cfg.py @@ -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. diff --git a/sycl/unittests/compression/CMakeLists.txt b/sycl/unittests/compression/CMakeLists.txt index eb1edae8c51a3..cbd67bdb237d3 100644 --- a/sycl/unittests/compression/CMakeLists.txt +++ b/sycl/unittests/compression/CMakeLists.txt @@ -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) diff --git a/sycl/unittests/kernel-and-program/CMakeLists.txt b/sycl/unittests/kernel-and-program/CMakeLists.txt index 82d301509661b..bd2fb0279e19c 100644 --- a/sycl/unittests/kernel-and-program/CMakeLists.txt +++ b/sycl/unittests/kernel-and-program/CMakeLists.txt @@ -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) diff --git a/sycl/unittests/pipes/CMakeLists.txt b/sycl/unittests/pipes/CMakeLists.txt index 023d5bf0e79fa..bcf1ec3912a86 100644 --- a/sycl/unittests/pipes/CMakeLists.txt +++ b/sycl/unittests/pipes/CMakeLists.txt @@ -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}) diff --git a/sycl/unittests/ur/CMakeLists.txt b/sycl/unittests/ur/CMakeLists.txt index ec1f8c523542a..12bb99d9f22cc 100644 --- a/sycl/unittests/ur/CMakeLists.txt +++ b/sycl/unittests/ur/CMakeLists.txt @@ -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}) diff --git a/sycl/unittests/xpti_trace/CMakeLists.txt b/sycl/unittests/xpti_trace/CMakeLists.txt index 44574d36a9aa4..13921dd371cd0 100644 --- a/sycl/unittests/xpti_trace/CMakeLists.txt +++ b/sycl/unittests/xpti_trace/CMakeLists.txt @@ -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)