From 1388818a0e6db7f34ba28bb50ef05008fb35a4e2 Mon Sep 17 00:00:00 2001 From: "Warchulski, Jaroslaw" Date: Mon, 25 Jul 2022 11:23:01 +0000 Subject: [PATCH] Move neo_shared_tests sources from /common to /unit_test Resolves: NEO-6524 Signed-off-by: Warchulski, Jaroslaw --- .../test/common/debug_settings/CMakeLists.txt | 14 +-- shared/test/common/gen11/CMakeLists.txt | 18 +--- shared/test/common/gen12lp/CMakeLists.txt | 20 +--- .../test/common/gen12lp/adln/CMakeLists.txt | 17 ---- .../test/common/gen12lp/adlp/CMakeLists.txt | 18 ---- .../test/common/gen12lp/adls/CMakeLists.txt | 15 --- shared/test/common/gen12lp/rkl/CMakeLists.txt | 14 --- shared/test/common/gen8/CMakeLists.txt | 19 +--- shared/test/common/gen9/CMakeLists.txt | 16 +--- shared/test/common/helpers/CMakeLists.txt | 60 +----------- .../common/test_macros/test_checks_shared.cpp | 28 +----- shared/test/common/xe_hp_core/CMakeLists.txt | 20 +--- shared/test/common/xe_hpg_core/CMakeLists.txt | 15 +-- .../common/xe_hpg_core/dg2/CMakeLists.txt | 16 ++-- .../unit_test/debug_settings/CMakeLists.txt | 19 ++++ .../debug_settings_manager_tests.cpp | 3 +- .../debug_settings_manager_linux_tests.cpp | 2 +- .../debug_variables_helper_linux_tests.cpp | 2 +- .../debug_variables_helper_windows_tests.cpp | 0 shared/test/unit_test/gen11/CMakeLists.txt | 8 ++ .../gen11/command_encoder_tests_gen11.cpp | 0 .../gen11/image_surface_state_tests_gen11.cpp | 0 .../gen11/preamble_tests_gen11.cpp | 2 +- .../gen11/simd_helper_tests_gen11.cpp | 2 +- .../gen11/test_encode_math_gen11.cpp | 0 .../gen11/test_preamble_gen11.cpp | 0 .../gen11/test_preemption_gen11.cpp | 0 shared/test/unit_test/gen12lp/CMakeLists.txt | 9 ++ .../unit_test/gen12lp/adln/CMakeLists.txt | 2 + .../gen12lp/adln/test_hw_info_config_adln.cpp | 0 .../unit_test/gen12lp/adlp/CMakeLists.txt | 8 +- .../adlp/preamble_helper_tests_adlp.cpp | 0 .../gen12lp/adlp/test_hw_info_config_adlp.cpp | 0 .../unit_test/gen12lp/adls/CMakeLists.txt | 7 +- .../gen12lp/adls/test_hw_info_config_adls.cpp | 0 .../gen12lp/command_encoder_tests_gen12lp.cpp | 0 .../image_surface_state_tests_gen12lp.cpp | 0 .../test/unit_test/gen12lp/rkl/CMakeLists.txt | 8 +- .../gen12lp/rkl/test_hw_info_config_rkl.cpp | 0 .../gen12lp/simd_helper_tests_gen12lp.cpp | 2 +- .../gen12lp/test_command_encoder_gen12lp.cpp | 0 .../gen12lp/test_encode_gen12lp.cpp | 0 .../gen12lp/test_encode_math_gen12lp.cpp | 0 .../gen12lp/test_preamble_gen12lp.cpp | 0 .../gen12lp/test_preemption_gen12lp.cpp | 0 shared/test/unit_test/gen8/CMakeLists.txt | 10 +- .../gen8/command_encoder_tests_gen8.cpp | 0 .../gen8/image_surface_state_tests_gen8.cpp | 0 .../gen8/simd_helper_tests_gen8.cpp | 2 +- .../gen8/state_base_address_tests_gen8.cpp | 0 .../gen8/test_encode_math_gen8.cpp | 0 .../gen8/test_preamble_gen8.cpp | 0 .../gen8/test_preemption_gen8.cpp | 0 shared/test/unit_test/gen9/CMakeLists.txt | 8 ++ .../gen9/command_encoder_tests_gen9.cpp | 0 .../gen9/image_surface_state_tests_gen9.cpp | 0 .../gen9/preamble_tests_gen9.cpp | 0 .../gen9/simd_helper_tests_gen9.cpp | 2 +- .../gen9/test_command_encoder_gen9.cpp | 0 .../gen9/test_encode_math_gen9.cpp | 0 .../gen9/test_preemption_gen9.cpp | 0 shared/test/unit_test/helpers/CMakeLists.txt | 93 ++++++++++++------- .../helpers/aligned_memory_tests.cpp | 0 .../helpers/bindless_heaps_helper_tests.cpp | 2 +- .../helpers/blit_commands_helper_tests.cpp | 0 .../blit_commands_helper_tests_gen12lp.cpp | 0 .../helpers/engine_node_helper_tests.cpp | 0 .../helpers/file_io_tests.cpp | 2 +- .../helpers/hash_tests.cpp | 2 +- .../helpers/heap_assigner_shared_tests.cpp | 2 +- .../helpers/hw_helper_extended_tests.cpp | 0 .../helpers/hw_helper_tests_dg2_and_later.cpp | 0 .../helpers/kernel_helpers_tests.cpp | 2 +- .../test/unit_test/helpers/matcher_tests.cpp | 35 +++++++ .../helpers/state_base_address_tests.cpp | 0 .../helpers/string_tests.cpp | 2 +- .../helpers/string_to_hash_tests.cpp | 2 +- ...est_blit_commands_helper_pvc_and_later.cpp | 0 ...st_blit_commands_helper_xehp_and_later.cpp | 0 .../test/unit_test/xe_hp_core/CMakeLists.txt | 25 ++--- .../image_surface_state_tests_xe_hp_core.cpp | 0 .../simd_helper_tests_xe_hp_core.cpp | 2 +- .../xe_hp_core/test_encode_xe_hp_core.cpp | 0 .../test_hw_info_config_xe_hp_core.cpp | 0 .../xe_hp_core/test_preemption_xe_hp_core.cpp | 0 .../test/unit_test/xe_hpg_core/CMakeLists.txt | 22 ++--- .../unit_test/xe_hpg_core/dg2/CMakeLists.txt | 5 + .../xe_hpg_core/dg2/test_encode_dg2.cpp | 0 .../dg2/test_encode_dispatch_kernel_dg2.cpp | 0 .../xe_hpg_core/dg2/test_hw_helper_dg2.cpp | 0 .../dg2/test_hw_info_config_dg2.cpp | 0 .../image_surface_state_tests_xe_hpg_core.cpp | 0 .../simd_helper_tests_xe_hpg_core.cpp | 2 +- 93 files changed, 237 insertions(+), 347 deletions(-) delete mode 100644 shared/test/common/gen12lp/adln/CMakeLists.txt delete mode 100644 shared/test/common/gen12lp/adlp/CMakeLists.txt delete mode 100644 shared/test/common/gen12lp/adls/CMakeLists.txt delete mode 100644 shared/test/common/gen12lp/rkl/CMakeLists.txt create mode 100644 shared/test/unit_test/debug_settings/CMakeLists.txt rename shared/test/{common => unit_test}/debug_settings/debug_settings_manager_tests.cpp (99%) rename shared/test/{common => unit_test}/debug_settings/linux/debug_settings_manager_linux_tests.cpp (98%) rename shared/test/{common => unit_test}/debug_settings/linux/debug_variables_helper_linux_tests.cpp (96%) rename shared/test/{common => unit_test}/debug_settings/windows/debug_variables_helper_windows_tests.cpp (100%) rename shared/test/{common => unit_test}/gen11/command_encoder_tests_gen11.cpp (100%) rename shared/test/{common => unit_test}/gen11/image_surface_state_tests_gen11.cpp (100%) rename shared/test/{common => unit_test}/gen11/preamble_tests_gen11.cpp (98%) rename shared/test/{common => unit_test}/gen11/simd_helper_tests_gen11.cpp (89%) rename shared/test/{common => unit_test}/gen11/test_encode_math_gen11.cpp (100%) rename shared/test/{common => unit_test}/gen11/test_preamble_gen11.cpp (100%) rename shared/test/{common => unit_test}/gen11/test_preemption_gen11.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/adln/test_hw_info_config_adln.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/adlp/preamble_helper_tests_adlp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/adlp/test_hw_info_config_adlp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/adls/test_hw_info_config_adls.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/command_encoder_tests_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/image_surface_state_tests_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/rkl/test_hw_info_config_rkl.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/simd_helper_tests_gen12lp.cpp (89%) rename shared/test/{common => unit_test}/gen12lp/test_command_encoder_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/test_encode_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/test_encode_math_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/test_preamble_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen12lp/test_preemption_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/gen8/command_encoder_tests_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen8/image_surface_state_tests_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen8/simd_helper_tests_gen8.cpp (89%) rename shared/test/{common => unit_test}/gen8/state_base_address_tests_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen8/test_encode_math_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen8/test_preamble_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen8/test_preemption_gen8.cpp (100%) rename shared/test/{common => unit_test}/gen9/command_encoder_tests_gen9.cpp (100%) rename shared/test/{common => unit_test}/gen9/image_surface_state_tests_gen9.cpp (100%) rename shared/test/{common => unit_test}/gen9/preamble_tests_gen9.cpp (100%) rename shared/test/{common => unit_test}/gen9/simd_helper_tests_gen9.cpp (89%) rename shared/test/{common => unit_test}/gen9/test_command_encoder_gen9.cpp (100%) rename shared/test/{common => unit_test}/gen9/test_encode_math_gen9.cpp (100%) rename shared/test/{common => unit_test}/gen9/test_preemption_gen9.cpp (100%) rename shared/test/{common => unit_test}/helpers/aligned_memory_tests.cpp (100%) rename shared/test/{common => unit_test}/helpers/bindless_heaps_helper_tests.cpp (99%) rename shared/test/{common => unit_test}/helpers/blit_commands_helper_tests.cpp (100%) rename shared/test/{common => unit_test}/helpers/blit_commands_helper_tests_gen12lp.cpp (100%) rename shared/test/{common => unit_test}/helpers/engine_node_helper_tests.cpp (100%) rename shared/test/{common => unit_test}/helpers/file_io_tests.cpp (95%) rename shared/test/{common => unit_test}/helpers/hash_tests.cpp (95%) rename shared/test/{common => unit_test}/helpers/heap_assigner_shared_tests.cpp (97%) rename shared/test/{common => unit_test}/helpers/hw_helper_extended_tests.cpp (100%) rename shared/test/{common => unit_test}/helpers/hw_helper_tests_dg2_and_later.cpp (100%) rename shared/test/{common => unit_test}/helpers/kernel_helpers_tests.cpp (98%) create mode 100644 shared/test/unit_test/helpers/matcher_tests.cpp rename shared/test/{common => unit_test}/helpers/state_base_address_tests.cpp (100%) rename shared/test/{common => unit_test}/helpers/string_tests.cpp (99%) rename shared/test/{common => unit_test}/helpers/string_to_hash_tests.cpp (99%) rename shared/test/{common => unit_test}/helpers/test_blit_commands_helper_pvc_and_later.cpp (100%) rename shared/test/{common => unit_test}/helpers/test_blit_commands_helper_xehp_and_later.cpp (100%) rename shared/test/{common => unit_test}/xe_hp_core/image_surface_state_tests_xe_hp_core.cpp (100%) rename shared/test/{common => unit_test}/xe_hp_core/simd_helper_tests_xe_hp_core.cpp (89%) rename shared/test/{common => unit_test}/xe_hp_core/test_encode_xe_hp_core.cpp (100%) rename shared/test/{common => unit_test}/xe_hp_core/test_hw_info_config_xe_hp_core.cpp (100%) rename shared/test/{common => unit_test}/xe_hp_core/test_preemption_xe_hp_core.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/dg2/test_encode_dg2.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/dg2/test_hw_helper_dg2.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/image_surface_state_tests_xe_hpg_core.cpp (100%) rename shared/test/{common => unit_test}/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp (89%) diff --git a/shared/test/common/debug_settings/CMakeLists.txt b/shared/test/common/debug_settings/CMakeLists.txt index aee2add1a7..8eb5b76ebc 100644 --- a/shared/test/common/debug_settings/CMakeLists.txt +++ b/shared/test/common/debug_settings/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2021 Intel Corporation +# Copyright (C) 2019-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,16 +8,4 @@ target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/debug_manager.cpp ${CMAKE_CURRENT_SOURCE_DIR}/debug_settings_manager_fixture.h - ${CMAKE_CURRENT_SOURCE_DIR}/debug_settings_manager_tests.cpp ) - -if(WIN32) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/windows/debug_variables_helper_windows_tests.cpp - ) -elseif(UNIX) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/linux/debug_settings_manager_linux_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/linux/debug_variables_helper_linux_tests.cpp - ) -endif() diff --git a/shared/test/common/gen11/CMakeLists.txt b/shared/test/common/gen11/CMakeLists.txt index 8dc254b9ef..9ad25e6fe6 100644 --- a/shared/test/common/gen11/CMakeLists.txt +++ b/shared/test/common/gen11/CMakeLists.txt @@ -1,26 +1,14 @@ # -# Copyright (C) 2019-2021 Intel Corporation +# Copyright (C) 2019-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_GEN11) - set(NEO_CORE_TESTS_GEN11 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen11.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN11 ${NEO_CORE_TESTS_GEN11}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen11.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen11.h ) + add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/CMakeLists.txt b/shared/test/common/gen12lp/CMakeLists.txt index e786a8451c..dffd7bbcb3 100644 --- a/shared/test/common/gen12lp/CMakeLists.txt +++ b/shared/test/common/gen12lp/CMakeLists.txt @@ -1,28 +1,14 @@ # -# Copyright (C) 2019-2021 Intel Corporation +# Copyright (C) 2019-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_GEN12LP) - - set(NEO_CORE_TESTS_GEN12LP - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen12lp.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN12LP ${NEO_CORE_TESTS_GEN12LP}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen12lp.h ) + add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/adln/CMakeLists.txt b/shared/test/common/gen12lp/adln/CMakeLists.txt deleted file mode 100644 index 7205716752..0000000000 --- a/shared/test/common/gen12lp/adln/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2022 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ADLN) - set(NEO_CORE_TESTS_GEN12LP_ADLN - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adln.cpp - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN12LP_ADLN ${NEO_CORE_TESTS_GEN12LP_ADLN}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE - ${NEO_CORE_TESTS_GEN12LP_ADLN} - ) -endif() diff --git a/shared/test/common/gen12lp/adlp/CMakeLists.txt b/shared/test/common/gen12lp/adlp/CMakeLists.txt deleted file mode 100644 index 29c90220bc..0000000000 --- a/shared/test/common/gen12lp/adlp/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ADLP) - set(NEO_CORE_TESTS_GEN12LP_ADLP - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/preamble_helper_tests_adlp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adlp.cpp - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN12LP_ADLP ${NEO_CORE_TESTS_GEN12LP_ADLP}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE - ${NEO_CORE_TESTS_GEN12LP_ADLP} - ) -endif() diff --git a/shared/test/common/gen12lp/adls/CMakeLists.txt b/shared/test/common/gen12lp/adls/CMakeLists.txt deleted file mode 100644 index d1ae82a8aa..0000000000 --- a/shared/test/common/gen12lp/adls/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_ADLS) - set(NEO_CORE_TESTS_GEN12LP_ADLS - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adls.cpp - ) - - target_sources(${TARGET_NAME} PRIVATE ${NEO_CORE_TESTS_GEN12LP_ADLS}) - add_subdirectories() -endif() diff --git a/shared/test/common/gen12lp/rkl/CMakeLists.txt b/shared/test/common/gen12lp/rkl/CMakeLists.txt deleted file mode 100644 index 2e44e04dcd..0000000000 --- a/shared/test/common/gen12lp/rkl/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_RKL) - set(IGDRCL_SRCS_tests_gen12lp_rkl - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_rkl.cpp - ) - target_sources(neo_shared_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_rkl}) - add_subdirectories() -endif() diff --git a/shared/test/common/gen8/CMakeLists.txt b/shared/test/common/gen8/CMakeLists.txt index 480b38b035..174c6f766e 100644 --- a/shared/test/common/gen8/CMakeLists.txt +++ b/shared/test/common/gen8/CMakeLists.txt @@ -1,27 +1,14 @@ # -# Copyright (C) 2019-2021 Intel Corporation +# Copyright (C) 2019-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_GEN8) - - set(NEO_CORE_TESTS_GEN8 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen8.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN8 ${NEO_CORE_TESTS_GEN8}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen8.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen8.h ) + add_subdirectories() endif() diff --git a/shared/test/common/gen9/CMakeLists.txt b/shared/test/common/gen9/CMakeLists.txt index 365c1363d9..028e6bd74b 100644 --- a/shared/test/common/gen9/CMakeLists.txt +++ b/shared/test/common/gen9/CMakeLists.txt @@ -5,22 +5,8 @@ # if(TESTS_GEN9) - - set(NEO_CORE_TESTS_GEN9 - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen9.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN9 ${NEO_CORE_TESTS_GEN9}) - target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen9.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen9.h ) - endif() diff --git a/shared/test/common/helpers/CMakeLists.txt b/shared/test/common/helpers/CMakeLists.txt index 1b8ea69422..09aa59b59b 100644 --- a/shared/test/common/helpers/CMakeLists.txt +++ b/shared/test/common/helpers/CMakeLists.txt @@ -4,66 +4,8 @@ # SPDX-License-Identifier: MIT # -set(NEO_CORE_HELPERS_TESTS - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}hw_helper_extended_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/aligned_memory_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/bindless_heaps_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_tests.inl - ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_tests_gen12lp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debug_manager_state_restore.h - ${CMAKE_CURRENT_SOURCE_DIR}/default_hw_info.h - ${CMAKE_CURRENT_SOURCE_DIR}/default_hw_info.inl - ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_flags_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/engine_descriptor_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/file_io_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.h - ${CMAKE_CURRENT_SOURCE_DIR}/includes${BRANCH_DIR_SUFFIX}test_traits_common.h - ${CMAKE_CURRENT_SOURCE_DIR}/includes${BRANCH_DIR_SUFFIX}test_traits_platforms_common.h - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_binary_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_filename_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/memory_leak_listener.h - ${CMAKE_CURRENT_SOURCE_DIR}/memory_management.h - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests.inl - ${CMAKE_CURRENT_SOURCE_DIR}/string_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/string_to_hash_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits.h - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_platforms.h - ${CMAKE_CURRENT_SOURCE_DIR}/ult_hw_config.h - ${CMAKE_CURRENT_SOURCE_DIR}/ult_hw_config.inl - ${CMAKE_CURRENT_SOURCE_DIR}/ult_hw_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/variable_backup.h -) - -if(TESTS_XEHP_AND_LATER) - list(APPEND NEO_CORE_HELPERS_TESTS - ${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_xehp_and_later.cpp - ) -endif() - -if(TESTS_DG2_AND_LATER) - list(APPEND NEO_CORE_HELPERS_TESTS - ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_and_later.cpp - ) -endif() - if(TESTS_PVC_AND_LATER) - list(APPEND NEO_CORE_HELPERS_TESTS - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_pvc_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_pvc_and_later.cpp - ) + target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_pvc_and_later.inl) endif() add_subdirectories() - -target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.h - ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_shared_tests.cpp - ${NEO_CORE_HELPERS_TESTS} -) diff --git a/shared/test/common/test_macros/test_checks_shared.cpp b/shared/test/common/test_macros/test_checks_shared.cpp index 3c53ed6b68..f2eb53f37a 100644 --- a/shared/test/common/test_macros/test_checks_shared.cpp +++ b/shared/test/common/test_macros/test_checks_shared.cpp @@ -9,8 +9,6 @@ #include "shared/source/device/device.h" #include "shared/source/helpers/hw_helper.h" -#include "shared/source/os_interface/hw_info_config.h" -#include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/test_macros/hw_test.h" using namespace NEO; @@ -51,28 +49,4 @@ bool TestChecks::supportsSvm(const std::unique_ptr &pHardwareInfo) } bool TestChecks::supportsSvm(const Device *pDevice) { return supportsSvm(&pDevice->getHardwareInfo()); -} - -class TestMacrosIfNotMatchTearDownCall : public ::testing::Test { - public: - void expectCorrectPlatform() { - EXPECT_EQ(IGFX_SKYLAKE, defaultHwInfo->platform.eProductFamily); - } - void SetUp() override { - expectCorrectPlatform(); - } - void TearDown() override { - expectCorrectPlatform(); - } -}; - -HWTEST2_F(TestMacrosIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2FThenSetUpAndTearDownAreNotCalled, IsSKL) { - expectCorrectPlatform(); -} -class TestMacrosWithParamIfNotMatchTearDownCall : public TestMacrosIfNotMatchTearDownCall, public ::testing::WithParamInterface {}; -HWTEST2_P(TestMacrosWithParamIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, IsSKL) { - expectCorrectPlatform(); -} -INSTANTIATE_TEST_CASE_P(givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, - TestMacrosWithParamIfNotMatchTearDownCall, - ::testing::Values(0)); +} \ No newline at end of file diff --git a/shared/test/common/xe_hp_core/CMakeLists.txt b/shared/test/common/xe_hp_core/CMakeLists.txt index 1441f842cf..de5567c412 100644 --- a/shared/test/common/xe_hp_core/CMakeLists.txt +++ b/shared/test/common/xe_hp_core/CMakeLists.txt @@ -1,26 +1,14 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_XE_HP_CORE) - - set(NEO_CORE_TESTS_XE_HP_CORE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_xe_hp_core.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_XE_HP_CORE ${NEO_CORE_TESTS_XE_HP_CORE}) - add_subdirectories() - target_sources(${TARGET_NAME} PRIVATE - ${COMPUTE_RUNTIME_ULT_XE_HP_CORE} - ${NEO_CORE_TESTS_XE_HP_CORE} + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_xe_hp_core.h ) + add_subdirectories() endif() diff --git a/shared/test/common/xe_hpg_core/CMakeLists.txt b/shared/test/common/xe_hpg_core/CMakeLists.txt index f8edba3e54..3dfb864d0b 100644 --- a/shared/test/common/xe_hpg_core/CMakeLists.txt +++ b/shared/test/common/xe_hpg_core/CMakeLists.txt @@ -1,19 +1,10 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_XE_HPG_CORE) - - set(NEO_CORE_TESTS_XE_HPG_CORE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_xe_hpg_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_xe_hpg_core.h - ) - set_property(GLOBAL PROPERTY NEO_CORE_TESTS_XE_HPG_CORE ${NEO_CORE_TESTS_XE_HPG_CORE}) - add_subdirectories() - set(IGDRCL_SRCS_tests_xe_hpg_core_excludes ${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hpg_core.cpp ) @@ -22,9 +13,9 @@ if(TESTS_XE_HPG_CORE) target_sources(${TARGET_NAME} PRIVATE ${IGDRCL_SRCS_tests_xe_hpg_core_excludes} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_xe_hpg_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_xe_hpg_core.cpp - ${COMPUTE_RUNTIME_ULT_XE_HPG_CORE} + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_xe_hpg_core.h ) + add_subdirectories() endif() diff --git a/shared/test/common/xe_hpg_core/dg2/CMakeLists.txt b/shared/test/common/xe_hpg_core/dg2/CMakeLists.txt index cfd7e5275b..429bdc43cf 100644 --- a/shared/test/common/xe_hpg_core/dg2/CMakeLists.txt +++ b/shared/test/common/xe_hpg_core/dg2/CMakeLists.txt @@ -10,17 +10,13 @@ if(TESTS_DG2) ) set_property(GLOBAL APPEND PROPERTY IGDRCL_SRCS_tests_excludes ${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes}) - set(NEO_CORE_TESTS_XE_HPG_CORE_DG2 - ${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes} - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/product_configs_dg2.h - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dg2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_dg2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_dg2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_dg2.h + target_sources(${TARGET_NAME} PRIVATE + ${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes} + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/product_configs_dg2.h + ${CMAKE_CURRENT_SOURCE_DIR}/test_traits_dg2.h + ) - target_sources(${TARGET_NAME} PRIVATE ${NEO_CORE_TESTS_XE_HPG_CORE_DG2}) add_subdirectories() endif() diff --git a/shared/test/unit_test/debug_settings/CMakeLists.txt b/shared/test/unit_test/debug_settings/CMakeLists.txt new file mode 100644 index 0000000000..6a6f050f41 --- /dev/null +++ b/shared/test/unit_test/debug_settings/CMakeLists.txt @@ -0,0 +1,19 @@ +# +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/debug_settings_manager_tests.cpp +) + +if(WIN32) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/windows/debug_variables_helper_windows_tests.cpp) +elseif(UNIX) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/linux/debug_settings_manager_linux_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/linux/debug_variables_helper_linux_tests.cpp + ) +endif() \ No newline at end of file diff --git a/shared/test/common/debug_settings/debug_settings_manager_tests.cpp b/shared/test/unit_test/debug_settings/debug_settings_manager_tests.cpp similarity index 99% rename from shared/test/common/debug_settings/debug_settings_manager_tests.cpp rename to shared/test/unit_test/debug_settings/debug_settings_manager_tests.cpp index dd0acfd019..68e9a7732f 100644 --- a/shared/test/common/debug_settings/debug_settings_manager_tests.cpp +++ b/shared/test/unit_test/debug_settings/debug_settings_manager_tests.cpp @@ -8,12 +8,11 @@ #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/utilities/debug_file_reader.h" +#include "shared/test/common/debug_settings/debug_settings_manager_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/test.h" #include "shared/test/unit_test/utilities/base_object_utils.h" -#include "debug_settings_manager_fixture.h" - #include #include #include diff --git a/shared/test/common/debug_settings/linux/debug_settings_manager_linux_tests.cpp b/shared/test/unit_test/debug_settings/linux/debug_settings_manager_linux_tests.cpp similarity index 98% rename from shared/test/common/debug_settings/linux/debug_settings_manager_linux_tests.cpp rename to shared/test/unit_test/debug_settings/linux/debug_settings_manager_linux_tests.cpp index 786472548d..7ecd4ef236 100644 --- a/shared/test/common/debug_settings/linux/debug_settings_manager_linux_tests.cpp +++ b/shared/test/unit_test/debug_settings/linux/debug_settings_manager_linux_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/debug_settings/linux/debug_variables_helper_linux_tests.cpp b/shared/test/unit_test/debug_settings/linux/debug_variables_helper_linux_tests.cpp similarity index 96% rename from shared/test/common/debug_settings/linux/debug_variables_helper_linux_tests.cpp rename to shared/test/unit_test/debug_settings/linux/debug_variables_helper_linux_tests.cpp index 5ba89dd63b..00c8d18af2 100644 --- a/shared/test/common/debug_settings/linux/debug_variables_helper_linux_tests.cpp +++ b/shared/test/unit_test/debug_settings/linux/debug_variables_helper_linux_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/debug_settings/windows/debug_variables_helper_windows_tests.cpp b/shared/test/unit_test/debug_settings/windows/debug_variables_helper_windows_tests.cpp similarity index 100% rename from shared/test/common/debug_settings/windows/debug_variables_helper_windows_tests.cpp rename to shared/test/unit_test/debug_settings/windows/debug_variables_helper_windows_tests.cpp diff --git a/shared/test/unit_test/gen11/CMakeLists.txt b/shared/test/unit_test/gen11/CMakeLists.txt index 871e408a4c..edd193cf04 100644 --- a/shared/test/unit_test/gen11/CMakeLists.txt +++ b/shared/test/unit_test/gen11/CMakeLists.txt @@ -8,7 +8,15 @@ if(TESTS_GEN11) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen11.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen11_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen11.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen11.cpp ) + add_subdirectories() endif() diff --git a/shared/test/common/gen11/command_encoder_tests_gen11.cpp b/shared/test/unit_test/gen11/command_encoder_tests_gen11.cpp similarity index 100% rename from shared/test/common/gen11/command_encoder_tests_gen11.cpp rename to shared/test/unit_test/gen11/command_encoder_tests_gen11.cpp diff --git a/shared/test/common/gen11/image_surface_state_tests_gen11.cpp b/shared/test/unit_test/gen11/image_surface_state_tests_gen11.cpp similarity index 100% rename from shared/test/common/gen11/image_surface_state_tests_gen11.cpp rename to shared/test/unit_test/gen11/image_surface_state_tests_gen11.cpp diff --git a/shared/test/common/gen11/preamble_tests_gen11.cpp b/shared/test/unit_test/gen11/preamble_tests_gen11.cpp similarity index 98% rename from shared/test/common/gen11/preamble_tests_gen11.cpp rename to shared/test/unit_test/gen11/preamble_tests_gen11.cpp index eb932533d3..567e718f7b 100644 --- a/shared/test/common/gen11/preamble_tests_gen11.cpp +++ b/shared/test/unit_test/gen11/preamble_tests_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/gen11/simd_helper_tests_gen11.cpp b/shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp similarity index 89% rename from shared/test/common/gen11/simd_helper_tests_gen11.cpp rename to shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp index f59904f9b0..ad77cb92e3 100644 --- a/shared/test/common/gen11/simd_helper_tests_gen11.cpp +++ b/shared/test/unit_test/gen11/simd_helper_tests_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/gen11/test_encode_math_gen11.cpp b/shared/test/unit_test/gen11/test_encode_math_gen11.cpp similarity index 100% rename from shared/test/common/gen11/test_encode_math_gen11.cpp rename to shared/test/unit_test/gen11/test_encode_math_gen11.cpp diff --git a/shared/test/common/gen11/test_preamble_gen11.cpp b/shared/test/unit_test/gen11/test_preamble_gen11.cpp similarity index 100% rename from shared/test/common/gen11/test_preamble_gen11.cpp rename to shared/test/unit_test/gen11/test_preamble_gen11.cpp diff --git a/shared/test/common/gen11/test_preemption_gen11.cpp b/shared/test/unit_test/gen11/test_preemption_gen11.cpp similarity index 100% rename from shared/test/common/gen11/test_preemption_gen11.cpp rename to shared/test/unit_test/gen11/test_preemption_gen11.cpp diff --git a/shared/test/unit_test/gen12lp/CMakeLists.txt b/shared/test/unit_test/gen12lp/CMakeLists.txt index d1b624a08a..70fac22814 100644 --- a/shared/test/unit_test/gen12lp/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/CMakeLists.txt @@ -8,10 +8,19 @@ if(TESTS_GEN12LP) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_tests_gen12lp.inl + ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen12lp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_tests_gen12lp.inl ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_gen12lp.inl ${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_shared_tests_wrapper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen12lp.cpp ) + add_subdirectories() endif() diff --git a/shared/test/unit_test/gen12lp/adln/CMakeLists.txt b/shared/test/unit_test/gen12lp/adln/CMakeLists.txt index 72392c5f95..df944a7f2e 100644 --- a/shared/test/unit_test/gen12lp/adln/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/adln/CMakeLists.txt @@ -8,6 +8,8 @@ if(TESTS_ADLN) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_adln.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adln.cpp ) + add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/adln/test_hw_info_config_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp similarity index 100% rename from shared/test/common/gen12lp/adln/test_hw_info_config_adln.cpp rename to shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp diff --git a/shared/test/unit_test/gen12lp/adlp/CMakeLists.txt b/shared/test/unit_test/gen12lp/adlp/CMakeLists.txt index 830cb8a7b8..6a1fa773a0 100644 --- a/shared/test/unit_test/gen12lp/adlp/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/adlp/CMakeLists.txt @@ -1,9 +1,15 @@ # -# Copyright (C) 2022 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_ADLP) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/preamble_helper_tests_adlp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adlp.cpp + ) + add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/adlp/preamble_helper_tests_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/preamble_helper_tests_adlp.cpp similarity index 100% rename from shared/test/common/gen12lp/adlp/preamble_helper_tests_adlp.cpp rename to shared/test/unit_test/gen12lp/adlp/preamble_helper_tests_adlp.cpp diff --git a/shared/test/common/gen12lp/adlp/test_hw_info_config_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp similarity index 100% rename from shared/test/common/gen12lp/adlp/test_hw_info_config_adlp.cpp rename to shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp diff --git a/shared/test/unit_test/gen12lp/adls/CMakeLists.txt b/shared/test/unit_test/gen12lp/adls/CMakeLists.txt index d4b41e3a86..356263ee26 100644 --- a/shared/test/unit_test/gen12lp/adls/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/adls/CMakeLists.txt @@ -1,9 +1,14 @@ # -# Copyright (C) 2022 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(TESTS_ADLS) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_adls.cpp + ) + add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp similarity index 100% rename from shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp rename to shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp diff --git a/shared/test/common/gen12lp/command_encoder_tests_gen12lp.cpp b/shared/test/unit_test/gen12lp/command_encoder_tests_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/command_encoder_tests_gen12lp.cpp rename to shared/test/unit_test/gen12lp/command_encoder_tests_gen12lp.cpp diff --git a/shared/test/common/gen12lp/image_surface_state_tests_gen12lp.cpp b/shared/test/unit_test/gen12lp/image_surface_state_tests_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/image_surface_state_tests_gen12lp.cpp rename to shared/test/unit_test/gen12lp/image_surface_state_tests_gen12lp.cpp diff --git a/shared/test/unit_test/gen12lp/rkl/CMakeLists.txt b/shared/test/unit_test/gen12lp/rkl/CMakeLists.txt index 764364fcb4..c46b735983 100644 --- a/shared/test/unit_test/gen12lp/rkl/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/rkl/CMakeLists.txt @@ -5,11 +5,11 @@ # if(TESTS_RKL) - set(NEO_SHARED_tests_gen12lp_rkl - ${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen12lp_rkl.cpp + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/excludes_gen12lp_rkl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_rkl.cpp ) - target_sources(${TARGET_NAME} PRIVATE ${NEO_SHARED_tests_gen12lp_rkl}) - add_subdirectories() endif() diff --git a/shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp b/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp similarity index 100% rename from shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp rename to shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp diff --git a/shared/test/common/gen12lp/simd_helper_tests_gen12lp.cpp b/shared/test/unit_test/gen12lp/simd_helper_tests_gen12lp.cpp similarity index 89% rename from shared/test/common/gen12lp/simd_helper_tests_gen12lp.cpp rename to shared/test/unit_test/gen12lp/simd_helper_tests_gen12lp.cpp index b59df7635d..9c80278516 100644 --- a/shared/test/common/gen12lp/simd_helper_tests_gen12lp.cpp +++ b/shared/test/unit_test/gen12lp/simd_helper_tests_gen12lp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/gen12lp/test_command_encoder_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/test_command_encoder_gen12lp.cpp rename to shared/test/unit_test/gen12lp/test_command_encoder_gen12lp.cpp diff --git a/shared/test/common/gen12lp/test_encode_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/test_encode_gen12lp.cpp rename to shared/test/unit_test/gen12lp/test_encode_gen12lp.cpp diff --git a/shared/test/common/gen12lp/test_encode_math_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/test_encode_math_gen12lp.cpp rename to shared/test/unit_test/gen12lp/test_encode_math_gen12lp.cpp diff --git a/shared/test/common/gen12lp/test_preamble_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/test_preamble_gen12lp.cpp rename to shared/test/unit_test/gen12lp/test_preamble_gen12lp.cpp diff --git a/shared/test/common/gen12lp/test_preemption_gen12lp.cpp b/shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp similarity index 100% rename from shared/test/common/gen12lp/test_preemption_gen12lp.cpp rename to shared/test/unit_test/gen12lp/test_preemption_gen12lp.cpp diff --git a/shared/test/unit_test/gen8/CMakeLists.txt b/shared/test/unit_test/gen8/CMakeLists.txt index cdfff1d952..c09bef5c06 100644 --- a/shared/test/unit_test/gen8/CMakeLists.txt +++ b/shared/test/unit_test/gen8/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,10 +8,18 @@ if(TESTS_GEN8) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen8.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen8.cpp ) + add_subdirectories() endif() diff --git a/shared/test/common/gen8/command_encoder_tests_gen8.cpp b/shared/test/unit_test/gen8/command_encoder_tests_gen8.cpp similarity index 100% rename from shared/test/common/gen8/command_encoder_tests_gen8.cpp rename to shared/test/unit_test/gen8/command_encoder_tests_gen8.cpp diff --git a/shared/test/common/gen8/image_surface_state_tests_gen8.cpp b/shared/test/unit_test/gen8/image_surface_state_tests_gen8.cpp similarity index 100% rename from shared/test/common/gen8/image_surface_state_tests_gen8.cpp rename to shared/test/unit_test/gen8/image_surface_state_tests_gen8.cpp diff --git a/shared/test/common/gen8/simd_helper_tests_gen8.cpp b/shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp similarity index 89% rename from shared/test/common/gen8/simd_helper_tests_gen8.cpp rename to shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp index 289f9c3432..494a5502b7 100644 --- a/shared/test/common/gen8/simd_helper_tests_gen8.cpp +++ b/shared/test/unit_test/gen8/simd_helper_tests_gen8.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/gen8/state_base_address_tests_gen8.cpp b/shared/test/unit_test/gen8/state_base_address_tests_gen8.cpp similarity index 100% rename from shared/test/common/gen8/state_base_address_tests_gen8.cpp rename to shared/test/unit_test/gen8/state_base_address_tests_gen8.cpp diff --git a/shared/test/common/gen8/test_encode_math_gen8.cpp b/shared/test/unit_test/gen8/test_encode_math_gen8.cpp similarity index 100% rename from shared/test/common/gen8/test_encode_math_gen8.cpp rename to shared/test/unit_test/gen8/test_encode_math_gen8.cpp diff --git a/shared/test/common/gen8/test_preamble_gen8.cpp b/shared/test/unit_test/gen8/test_preamble_gen8.cpp similarity index 100% rename from shared/test/common/gen8/test_preamble_gen8.cpp rename to shared/test/unit_test/gen8/test_preamble_gen8.cpp diff --git a/shared/test/common/gen8/test_preemption_gen8.cpp b/shared/test/unit_test/gen8/test_preemption_gen8.cpp similarity index 100% rename from shared/test/common/gen8/test_preemption_gen8.cpp rename to shared/test/unit_test/gen8/test_preemption_gen8.cpp diff --git a/shared/test/unit_test/gen9/CMakeLists.txt b/shared/test/unit_test/gen9/CMakeLists.txt index cce04da806..df847b7ad5 100644 --- a/shared/test/unit_test/gen9/CMakeLists.txt +++ b/shared/test/unit_test/gen9/CMakeLists.txt @@ -7,8 +7,16 @@ if(TESTS_GEN9) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen9.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_math_gen9.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen9.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen9.cpp ) + add_subdirectories() endif() diff --git a/shared/test/common/gen9/command_encoder_tests_gen9.cpp b/shared/test/unit_test/gen9/command_encoder_tests_gen9.cpp similarity index 100% rename from shared/test/common/gen9/command_encoder_tests_gen9.cpp rename to shared/test/unit_test/gen9/command_encoder_tests_gen9.cpp diff --git a/shared/test/common/gen9/image_surface_state_tests_gen9.cpp b/shared/test/unit_test/gen9/image_surface_state_tests_gen9.cpp similarity index 100% rename from shared/test/common/gen9/image_surface_state_tests_gen9.cpp rename to shared/test/unit_test/gen9/image_surface_state_tests_gen9.cpp diff --git a/shared/test/common/gen9/preamble_tests_gen9.cpp b/shared/test/unit_test/gen9/preamble_tests_gen9.cpp similarity index 100% rename from shared/test/common/gen9/preamble_tests_gen9.cpp rename to shared/test/unit_test/gen9/preamble_tests_gen9.cpp diff --git a/shared/test/common/gen9/simd_helper_tests_gen9.cpp b/shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp similarity index 89% rename from shared/test/common/gen9/simd_helper_tests_gen9.cpp rename to shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp index a42c6148db..eb6b121c04 100644 --- a/shared/test/common/gen9/simd_helper_tests_gen9.cpp +++ b/shared/test/unit_test/gen9/simd_helper_tests_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/gen9/test_command_encoder_gen9.cpp b/shared/test/unit_test/gen9/test_command_encoder_gen9.cpp similarity index 100% rename from shared/test/common/gen9/test_command_encoder_gen9.cpp rename to shared/test/unit_test/gen9/test_command_encoder_gen9.cpp diff --git a/shared/test/common/gen9/test_encode_math_gen9.cpp b/shared/test/unit_test/gen9/test_encode_math_gen9.cpp similarity index 100% rename from shared/test/common/gen9/test_encode_math_gen9.cpp rename to shared/test/unit_test/gen9/test_encode_math_gen9.cpp diff --git a/shared/test/common/gen9/test_preemption_gen9.cpp b/shared/test/unit_test/gen9/test_preemption_gen9.cpp similarity index 100% rename from shared/test/common/gen9/test_preemption_gen9.cpp rename to shared/test/unit_test/gen9/test_preemption_gen9.cpp diff --git a/shared/test/unit_test/helpers/CMakeLists.txt b/shared/test/unit_test/helpers/CMakeLists.txt index cd81f52e77..1214a1ace2 100644 --- a/shared/test/unit_test/helpers/CMakeLists.txt +++ b/shared/test/unit_test/helpers/CMakeLists.txt @@ -4,47 +4,68 @@ # SPDX-License-Identifier: MIT # -set(SHARED_SRCS_tests_helpers - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/app_resource_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/array_count_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/basic_math_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/bit_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator.h - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/debug_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl - ${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h - ${CMAKE_CURRENT_SOURCE_DIR}/l3_range_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ptr_math_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/raii_hw_helper.h - ${CMAKE_CURRENT_SOURCE_DIR}/static_size3.h - ${CMAKE_CURRENT_SOURCE_DIR}/test_debug_variables.inl - ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ult_limits.h +target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}hw_helper_extended_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/aligned_memory_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/app_resource_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/array_count_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/basic_math_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/bindless_heaps_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/bit_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_tests_gen12lp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator.h + ${CMAKE_CURRENT_SOURCE_DIR}/cmd_buffer_validator_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/debug_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/file_io_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl + ${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h + ${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_shared_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/l3_range_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/matcher_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ptr_math_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/raii_hw_helper.h + ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/static_size3.h + ${CMAKE_CURRENT_SOURCE_DIR}/string_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/string_to_hash_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_debug_variables.inl + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ult_limits.h ) if(MSVC OR COMPILER_SUPPORTS_SSE42) - list(APPEND SHARED_SRCS_tests_helpers - ${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4_tests.cpp - ) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4_tests.cpp) endif() if(COMPILER_SUPPORTS_NEON) - list(APPEND SHARED_SRCS_tests_helpers - ${CMAKE_CURRENT_SOURCE_DIR}/uint16_neon_tests.cpp - ) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/uint16_neon_tests.cpp) endif() -target_sources(${TARGET_NAME} PRIVATE ${SHARED_SRCS_tests_helpers}) -add_subdirectories() +if(TESTS_XEHP_AND_LATER) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_xehp_and_later.cpp) +endif() + +if(TESTS_DG2_AND_LATER) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2_and_later.cpp) +endif() + +if(TESTS_PVC_AND_LATER) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/test_blit_commands_helper_pvc_and_later.cpp) +endif() + +add_subdirectories() \ No newline at end of file diff --git a/shared/test/common/helpers/aligned_memory_tests.cpp b/shared/test/unit_test/helpers/aligned_memory_tests.cpp similarity index 100% rename from shared/test/common/helpers/aligned_memory_tests.cpp rename to shared/test/unit_test/helpers/aligned_memory_tests.cpp diff --git a/shared/test/common/helpers/bindless_heaps_helper_tests.cpp b/shared/test/unit_test/helpers/bindless_heaps_helper_tests.cpp similarity index 99% rename from shared/test/common/helpers/bindless_heaps_helper_tests.cpp rename to shared/test/unit_test/helpers/bindless_heaps_helper_tests.cpp index d190a6db78..532b4fc9c1 100644 --- a/shared/test/common/helpers/bindless_heaps_helper_tests.cpp +++ b/shared/test/unit_test/helpers/bindless_heaps_helper_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/blit_commands_helper_tests.cpp b/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp similarity index 100% rename from shared/test/common/helpers/blit_commands_helper_tests.cpp rename to shared/test/unit_test/helpers/blit_commands_helper_tests.cpp diff --git a/shared/test/common/helpers/blit_commands_helper_tests_gen12lp.cpp b/shared/test/unit_test/helpers/blit_commands_helper_tests_gen12lp.cpp similarity index 100% rename from shared/test/common/helpers/blit_commands_helper_tests_gen12lp.cpp rename to shared/test/unit_test/helpers/blit_commands_helper_tests_gen12lp.cpp diff --git a/shared/test/common/helpers/engine_node_helper_tests.cpp b/shared/test/unit_test/helpers/engine_node_helper_tests.cpp similarity index 100% rename from shared/test/common/helpers/engine_node_helper_tests.cpp rename to shared/test/unit_test/helpers/engine_node_helper_tests.cpp diff --git a/shared/test/common/helpers/file_io_tests.cpp b/shared/test/unit_test/helpers/file_io_tests.cpp similarity index 95% rename from shared/test/common/helpers/file_io_tests.cpp rename to shared/test/unit_test/helpers/file_io_tests.cpp index 9b0eb31061..e516f147c2 100644 --- a/shared/test/common/helpers/file_io_tests.cpp +++ b/shared/test/unit_test/helpers/file_io_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/hash_tests.cpp b/shared/test/unit_test/helpers/hash_tests.cpp similarity index 95% rename from shared/test/common/helpers/hash_tests.cpp rename to shared/test/unit_test/helpers/hash_tests.cpp index d08414eb2e..658ab0bbed 100644 --- a/shared/test/common/helpers/hash_tests.cpp +++ b/shared/test/unit_test/helpers/hash_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/heap_assigner_shared_tests.cpp b/shared/test/unit_test/helpers/heap_assigner_shared_tests.cpp similarity index 97% rename from shared/test/common/helpers/heap_assigner_shared_tests.cpp rename to shared/test/unit_test/helpers/heap_assigner_shared_tests.cpp index 981a28463f..b1c3f0c705 100644 --- a/shared/test/common/helpers/heap_assigner_shared_tests.cpp +++ b/shared/test/unit_test/helpers/heap_assigner_shared_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/hw_helper_extended_tests.cpp b/shared/test/unit_test/helpers/hw_helper_extended_tests.cpp similarity index 100% rename from shared/test/common/helpers/hw_helper_extended_tests.cpp rename to shared/test/unit_test/helpers/hw_helper_extended_tests.cpp diff --git a/shared/test/common/helpers/hw_helper_tests_dg2_and_later.cpp b/shared/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp similarity index 100% rename from shared/test/common/helpers/hw_helper_tests_dg2_and_later.cpp rename to shared/test/unit_test/helpers/hw_helper_tests_dg2_and_later.cpp diff --git a/shared/test/common/helpers/kernel_helpers_tests.cpp b/shared/test/unit_test/helpers/kernel_helpers_tests.cpp similarity index 98% rename from shared/test/common/helpers/kernel_helpers_tests.cpp rename to shared/test/unit_test/helpers/kernel_helpers_tests.cpp index 4b54f322e3..c436986e26 100644 --- a/shared/test/common/helpers/kernel_helpers_tests.cpp +++ b/shared/test/unit_test/helpers/kernel_helpers_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/unit_test/helpers/matcher_tests.cpp b/shared/test/unit_test/helpers/matcher_tests.cpp new file mode 100644 index 0000000000..b0598ae529 --- /dev/null +++ b/shared/test/unit_test/helpers/matcher_tests.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2022 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/test/common/helpers/default_hw_info.h" +#include "shared/test/common/test_macros/hw_test.h" + +using namespace NEO; + +class TestMacrosIfNotMatchTearDownCall : public ::testing::Test { + public: + void expectCorrectPlatform() { + EXPECT_EQ(IGFX_SKYLAKE, defaultHwInfo->platform.eProductFamily); + } + void SetUp() override { + expectCorrectPlatform(); + } + void TearDown() override { + expectCorrectPlatform(); + } +}; + +HWTEST2_F(TestMacrosIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2FThenSetUpAndTearDownAreNotCalled, IsSKL) { + expectCorrectPlatform(); +} +class TestMacrosWithParamIfNotMatchTearDownCall : public TestMacrosIfNotMatchTearDownCall, public ::testing::WithParamInterface {}; +HWTEST2_P(TestMacrosWithParamIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, IsSKL) { + expectCorrectPlatform(); +} +INSTANTIATE_TEST_CASE_P(givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, + TestMacrosWithParamIfNotMatchTearDownCall, + ::testing::Values(0)); \ No newline at end of file diff --git a/shared/test/common/helpers/state_base_address_tests.cpp b/shared/test/unit_test/helpers/state_base_address_tests.cpp similarity index 100% rename from shared/test/common/helpers/state_base_address_tests.cpp rename to shared/test/unit_test/helpers/state_base_address_tests.cpp diff --git a/shared/test/common/helpers/string_tests.cpp b/shared/test/unit_test/helpers/string_tests.cpp similarity index 99% rename from shared/test/common/helpers/string_tests.cpp rename to shared/test/unit_test/helpers/string_tests.cpp index 3bbc2cd8d0..107ec21a9c 100644 --- a/shared/test/common/helpers/string_tests.cpp +++ b/shared/test/unit_test/helpers/string_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/string_to_hash_tests.cpp b/shared/test/unit_test/helpers/string_to_hash_tests.cpp similarity index 99% rename from shared/test/common/helpers/string_to_hash_tests.cpp rename to shared/test/unit_test/helpers/string_to_hash_tests.cpp index b937734152..db09ae2202 100644 --- a/shared/test/common/helpers/string_to_hash_tests.cpp +++ b/shared/test/unit_test/helpers/string_to_hash_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/helpers/test_blit_commands_helper_pvc_and_later.cpp b/shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp similarity index 100% rename from shared/test/common/helpers/test_blit_commands_helper_pvc_and_later.cpp rename to shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp diff --git a/shared/test/common/helpers/test_blit_commands_helper_xehp_and_later.cpp b/shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp similarity index 100% rename from shared/test/common/helpers/test_blit_commands_helper_xehp_and_later.cpp rename to shared/test/unit_test/helpers/test_blit_commands_helper_xehp_and_later.cpp diff --git a/shared/test/unit_test/xe_hp_core/CMakeLists.txt b/shared/test/unit_test/xe_hp_core/CMakeLists.txt index 40cfe194b4..663d88d846 100644 --- a/shared/test/unit_test/xe_hp_core/CMakeLists.txt +++ b/shared/test/unit_test/xe_hp_core/CMakeLists.txt @@ -5,20 +5,23 @@ # if(TESTS_XE_HP_CORE) - set(NEO_SHARED_tests_xe_hp_core - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hp_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hp_core_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_xe_hp_core_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/product_config_tests_xe_hp_core.cpp + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hp_core_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_xe_hp_core_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/product_config_tests_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_xe_hp_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_xe_hp_core.cpp ) if(DEFINED AUB_STREAM_PROJECT_NAME) - list(APPEND NEO_SHARED_tests_xe_hp_core - ${CMAKE_CURRENT_SOURCE_DIR}/aub_center_using_aubstream_lib_tests_xe_hp_core.cpp - ) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/aub_center_using_aubstream_lib_tests_xe_hp_core.cpp) endif() - target_sources(${TARGET_NAME} PRIVATE ${NEO_SHARED_tests_xe_hp_core}) + add_subdirectories() endif() diff --git a/shared/test/common/xe_hp_core/image_surface_state_tests_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/image_surface_state_tests_xe_hp_core.cpp similarity index 100% rename from shared/test/common/xe_hp_core/image_surface_state_tests_xe_hp_core.cpp rename to shared/test/unit_test/xe_hp_core/image_surface_state_tests_xe_hp_core.cpp diff --git a/shared/test/common/xe_hp_core/simd_helper_tests_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/simd_helper_tests_xe_hp_core.cpp similarity index 89% rename from shared/test/common/xe_hp_core/simd_helper_tests_xe_hp_core.cpp rename to shared/test/unit_test/xe_hp_core/simd_helper_tests_xe_hp_core.cpp index 82c76e29c9..c61d1e9558 100644 --- a/shared/test/common/xe_hp_core/simd_helper_tests_xe_hp_core.cpp +++ b/shared/test/unit_test/xe_hp_core/simd_helper_tests_xe_hp_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/test/common/xe_hp_core/test_encode_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp similarity index 100% rename from shared/test/common/xe_hp_core/test_encode_xe_hp_core.cpp rename to shared/test/unit_test/xe_hp_core/test_encode_xe_hp_core.cpp diff --git a/shared/test/common/xe_hp_core/test_hw_info_config_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/test_hw_info_config_xe_hp_core.cpp similarity index 100% rename from shared/test/common/xe_hp_core/test_hw_info_config_xe_hp_core.cpp rename to shared/test/unit_test/xe_hp_core/test_hw_info_config_xe_hp_core.cpp diff --git a/shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp b/shared/test/unit_test/xe_hp_core/test_preemption_xe_hp_core.cpp similarity index 100% rename from shared/test/common/xe_hp_core/test_preemption_xe_hp_core.cpp rename to shared/test/unit_test/xe_hp_core/test_preemption_xe_hp_core.cpp diff --git a/shared/test/unit_test/xe_hpg_core/CMakeLists.txt b/shared/test/unit_test/xe_hpg_core/CMakeLists.txt index 770cf428f1..b47f437d4d 100644 --- a/shared/test/unit_test/xe_hpg_core/CMakeLists.txt +++ b/shared/test/unit_test/xe_hpg_core/CMakeLists.txt @@ -5,20 +5,20 @@ # if(TESTS_XE_HPG_CORE) - set(NEO_SHARED_tests_xe_hpg_core - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xe_hpg_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hpg_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpg_core_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_xe_hpg_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_xe_hpg_core.cpp + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/compute_mode_tests_xe_hpg_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hpg_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpg_core_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_xe_hpg_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_xe_hpg_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_xe_hpg_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_xe_hpg_core.cpp ) if(DEFINED AUB_STREAM_PROJECT_NAME) - list(APPEND NEO_SHARED_tests_xe_hpg_core - ${CMAKE_CURRENT_SOURCE_DIR}/aub_center_using_aubstream_lib_tests_xe_hpg_core.cpp - ) + target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/aub_center_using_aubstream_lib_tests_xe_hpg_core.cpp) endif() - target_sources(${TARGET_NAME} PRIVATE ${NEO_SHARED_tests_xe_hpg_core}) + add_subdirectories() endif() diff --git a/shared/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt b/shared/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt index b73f015db4..c91f5ba48b 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt +++ b/shared/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt @@ -15,6 +15,11 @@ if(TESTS_DG2) ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests_dg2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dg2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_dg2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_dg2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg2.cpp ) + add_subdirectories() endif() diff --git a/shared/test/common/xe_hpg_core/dg2/test_encode_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp similarity index 100% rename from shared/test/common/xe_hpg_core/dg2/test_encode_dg2.cpp rename to shared/test/unit_test/xe_hpg_core/dg2/test_encode_dg2.cpp diff --git a/shared/test/common/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp similarity index 100% rename from shared/test/common/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp rename to shared/test/unit_test/xe_hpg_core/dg2/test_encode_dispatch_kernel_dg2.cpp diff --git a/shared/test/common/xe_hpg_core/dg2/test_hw_helper_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_helper_dg2.cpp similarity index 100% rename from shared/test/common/xe_hpg_core/dg2/test_hw_helper_dg2.cpp rename to shared/test/unit_test/xe_hpg_core/dg2/test_hw_helper_dg2.cpp diff --git a/shared/test/common/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp similarity index 100% rename from shared/test/common/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp rename to shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp diff --git a/shared/test/common/xe_hpg_core/image_surface_state_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/image_surface_state_tests_xe_hpg_core.cpp similarity index 100% rename from shared/test/common/xe_hpg_core/image_surface_state_tests_xe_hpg_core.cpp rename to shared/test/unit_test/xe_hpg_core/image_surface_state_tests_xe_hpg_core.cpp diff --git a/shared/test/common/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp similarity index 89% rename from shared/test/common/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp rename to shared/test/unit_test/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp index c1330630bd..cd0ae5ec3d 100644 --- a/shared/test/common/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/simd_helper_tests_xe_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT *