From b46dc0a6f857436157874b688efb367b4ea9324f Mon Sep 17 00:00:00 2001 From: Artur Harasimiuk Date: Fri, 24 Sep 2021 10:18:32 +0000 Subject: [PATCH] move mock_host_ptr_manager to shared Signed-off-by: Artur Harasimiuk --- .../test/unit_test/memory_manager/host_ptr_manager_tests.cpp | 2 +- opencl/test/unit_test/mocks/CMakeLists.txt | 1 - opencl/test/unit_test/mocks/mock_memory_manager.h | 3 +-- .../os_interface/linux/drm_command_stream_tests_1.cpp | 2 +- .../os_interface/linux/drm_command_stream_tests_2.cpp | 2 +- .../unit_test/os_interface/windows/mock_wddm_memory_manager.h | 2 +- shared/test/common/mocks/CMakeLists.txt | 1 + shared/test/common/mocks/linux/mock_drm_memory_manager.cpp | 2 +- .../test/common}/mocks/mock_host_ptr_manager.h | 0 9 files changed, 7 insertions(+), 8 deletions(-) rename {opencl/test/unit_test => shared/test/common}/mocks/mock_host_ptr_manager.h (100%) diff --git a/opencl/test/unit_test/memory_manager/host_ptr_manager_tests.cpp b/opencl/test/unit_test/memory_manager/host_ptr_manager_tests.cpp index fcd4038585..533de45120 100644 --- a/opencl/test/unit_test/memory_manager/host_ptr_manager_tests.cpp +++ b/opencl/test/unit_test/memory_manager/host_ptr_manager_tests.cpp @@ -11,11 +11,11 @@ #include "shared/source/helpers/ptr_math.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/fixtures/memory_manager_fixture.h" #include "opencl/test/unit_test/mocks/mock_allocation_properties.h" #include "opencl/test/unit_test/mocks/mock_csr.h" -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_internal_allocation_storage.h" #include "opencl/test/unit_test/mocks/mock_memory_manager.h" #include "test.h" diff --git a/opencl/test/unit_test/mocks/CMakeLists.txt b/opencl/test/unit_test/mocks/CMakeLists.txt index 9de3b3693a..08cbce10ca 100644 --- a/opencl/test/unit_test/mocks/CMakeLists.txt +++ b/opencl/test/unit_test/mocks/CMakeLists.txt @@ -31,7 +31,6 @@ set(IGDRCL_SRCS_tests_mocks ${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_page_table_mngr.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_resource_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_resource_info.h - ${CMAKE_CURRENT_SOURCE_DIR}/mock_host_ptr_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_image.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_internal_allocation_storage.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel.cpp diff --git a/opencl/test/unit_test/mocks/mock_memory_manager.h b/opencl/test/unit_test/mocks/mock_memory_manager.h index 7f66ebd34c..872dc987d2 100644 --- a/opencl/test/unit_test/mocks/mock_memory_manager.h +++ b/opencl/test/unit_test/mocks/mock_memory_manager.h @@ -10,8 +10,7 @@ #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_execution_environment.h" - -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "gmock/gmock.h" diff --git a/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp b/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp index 42cbfd6b6b..29147d7d5f 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_1.cpp @@ -24,6 +24,7 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "opencl/source/helpers/memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" @@ -34,7 +35,6 @@ #include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_gmm.h" #include "opencl/test/unit_test/mocks/mock_gmm_page_table_mngr.h" -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_program.h" #include "opencl/test/unit_test/mocks/mock_submissions_aggregator.h" #include "opencl/test/unit_test/os_interface/linux/drm_command_stream_fixture.h" diff --git a/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp b/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp index fedd8f66a5..47b66c79a6 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp @@ -22,6 +22,7 @@ #include "shared/test/common/cmd_parse/hw_parse.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "opencl/source/helpers/memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" @@ -32,7 +33,6 @@ #include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_gmm.h" #include "opencl/test/unit_test/mocks/mock_gmm_page_table_mngr.h" -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_program.h" #include "opencl/test/unit_test/mocks/mock_submissions_aggregator.h" #include "opencl/test/unit_test/os_interface/linux/drm_command_stream_fixture.h" diff --git a/opencl/test/unit_test/os_interface/windows/mock_wddm_memory_manager.h b/opencl/test/unit_test/os_interface/windows/mock_wddm_memory_manager.h index 21b75e1e24..122e30a4fc 100644 --- a/opencl/test/unit_test/os_interface/windows/mock_wddm_memory_manager.h +++ b/opencl/test/unit_test/os_interface/windows/mock_wddm_memory_manager.h @@ -8,9 +8,9 @@ #pragma once #include "shared/source/memory_manager/deferred_deleter.h" #include "shared/source/os_interface/windows/wddm_memory_manager.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_allocation_properties.h" -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_memory_manager.h" namespace NEO { diff --git a/shared/test/common/mocks/CMakeLists.txt b/shared/test/common/mocks/CMakeLists.txt index 12e639ff47..c4c548418d 100644 --- a/shared/test/common/mocks/CMakeLists.txt +++ b/shared/test/common/mocks/CMakeLists.txt @@ -46,6 +46,7 @@ set(NEO_CORE_tests_mocks ${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_client_context_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_client_context_base.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_graphics_allocation.h + ${CMAKE_CURRENT_SOURCE_DIR}/mock_host_ptr_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_hw_info_config.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_io_functions.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_operations_handler.h diff --git a/shared/test/common/mocks/linux/mock_drm_memory_manager.cpp b/shared/test/common/mocks/linux/mock_drm_memory_manager.cpp index 921ca4c159..a66fe4547b 100644 --- a/shared/test/common/mocks/linux/mock_drm_memory_manager.cpp +++ b/shared/test/common/mocks/linux/mock_drm_memory_manager.cpp @@ -9,9 +9,9 @@ #include "shared/source/os_interface/linux/allocator_helper.h" #include "shared/source/os_interface/linux/drm_memory_manager.h" +#include "shared/test/common/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_allocation_properties.h" -#include "opencl/test/unit_test/mocks/mock_host_ptr_manager.h" #include "opencl/test/unit_test/mocks/mock_memory_manager.h" #include diff --git a/opencl/test/unit_test/mocks/mock_host_ptr_manager.h b/shared/test/common/mocks/mock_host_ptr_manager.h similarity index 100% rename from opencl/test/unit_test/mocks/mock_host_ptr_manager.h rename to shared/test/common/mocks/mock_host_ptr_manager.h