Move neo_shared_tests sources from /common to /unit_test

Resolves: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
This commit is contained in:
Warchulski, Jaroslaw
2022-07-25 11:23:01 +00:00
committed by Compute-Runtime-Automation
parent e135c0ba82
commit 1388818a0e
93 changed files with 237 additions and 347 deletions

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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}
)

View File

@@ -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<HardwareInfo> &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<int> {};
HWTEST2_P(TestMacrosWithParamIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, IsSKL) {
expectCorrectPlatform();
}
INSTANTIATE_TEST_CASE_P(givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled,
TestMacrosWithParamIfNotMatchTearDownCall,
::testing::Values(0));
}

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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 <cstdio>
#include <memory>
#include <sstream>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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<int> {};
HWTEST2_P(TestMacrosWithParamIfNotMatchTearDownCall, givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled, IsSKL) {
expectCorrectPlatform();
}
INSTANTIATE_TEST_CASE_P(givenNotMatchPlatformWhenUseHwTest2PThenSetUpAndTearDownAreNotCalled,
TestMacrosWithParamIfNotMatchTearDownCall,
::testing::Values(0));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@@ -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()

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*