From 852b2f6e6ef81c8b7ee6434c9ec82798656a38a3 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Wed, 13 Oct 2021 10:08:43 +0000 Subject: [PATCH] Move mock_ostime to shared Signed-off-by: Mateusz Jablonski --- opencl/test/unit_test/api/cl_get_device_and_host_timer.inl | 3 ++- opencl/test/unit_test/device/device_timers_tests.cpp | 2 +- opencl/test/unit_test/device/device_win_timers_tests.cpp | 2 +- opencl/test/unit_test/event/event_tests.cpp | 2 +- opencl/test/unit_test/mocks/CMakeLists.txt | 1 - opencl/test/unit_test/scheduler/scheduler_kernel_tests.cpp | 2 +- shared/test/common/mocks/CMakeLists.txt | 1 + shared/test/common/mocks/mock_device.cpp | 3 +-- .../test/unit_test => shared/test/common}/mocks/mock_ostime.h | 0 9 files changed, 8 insertions(+), 8 deletions(-) rename {opencl/test/unit_test => shared/test/common}/mocks/mock_ostime.h (100%) diff --git a/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl b/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl index 24d62db687..c12a534901 100644 --- a/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl +++ b/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl @@ -5,8 +5,9 @@ * */ +#include "shared/test//common/mocks/mock_ostime.h" + #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" #include "cl_api_tests.h" diff --git a/opencl/test/unit_test/device/device_timers_tests.cpp b/opencl/test/unit_test/device/device_timers_tests.cpp index 3c2ca3db9e..38be8d0e40 100644 --- a/opencl/test/unit_test/device/device_timers_tests.cpp +++ b/opencl/test/unit_test/device/device_timers_tests.cpp @@ -5,10 +5,10 @@ * */ +#include "shared/test//common/mocks/mock_ostime.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" #include "gtest/gtest.h" diff --git a/opencl/test/unit_test/device/device_win_timers_tests.cpp b/opencl/test/unit_test/device/device_win_timers_tests.cpp index 22b2ba8972..ecd0b5b8e2 100644 --- a/opencl/test/unit_test/device/device_win_timers_tests.cpp +++ b/opencl/test/unit_test/device/device_win_timers_tests.cpp @@ -6,11 +6,11 @@ */ #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/test//common/mocks/mock_ostime.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_wddm.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" #include "opencl/test/unit_test/mocks/mock_ostime_win.h" #include "test.h" diff --git a/opencl/test/unit_test/event/event_tests.cpp b/opencl/test/unit_test/event/event_tests.cpp index 92f865a021..cde51b9185 100644 --- a/opencl/test/unit_test/event/event_tests.cpp +++ b/opencl/test/unit_test/event/event_tests.cpp @@ -11,6 +11,7 @@ #include "shared/source/os_interface/os_interface.h" #include "shared/source/utilities/perf_counter.h" #include "shared/source/utilities/tag_allocator.h" +#include "shared/test//common/mocks/mock_ostime.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_device.h" @@ -27,7 +28,6 @@ #include "opencl/test/unit_test/mocks/mock_event.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" #include "opencl/test/unit_test/mocks/mock_mdi.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" #include "opencl/test/unit_test/mocks/mock_platform.h" #include "opencl/test/unit_test/mocks/mock_program.h" #include "opencl/test/unit_test/os_interface/mock_performance_counters.h" diff --git a/opencl/test/unit_test/mocks/CMakeLists.txt b/opencl/test/unit_test/mocks/CMakeLists.txt index fa0a69a3e7..2acf672add 100644 --- a/opencl/test/unit_test/mocks/CMakeLists.txt +++ b/opencl/test/unit_test/mocks/CMakeLists.txt @@ -35,7 +35,6 @@ set(IGDRCL_SRCS_tests_mocks ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_lrca_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_os_context.h - ${CMAKE_CURRENT_SOURCE_DIR}/mock_ostime.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_platform.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_platform.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_program.cpp diff --git a/opencl/test/unit_test/scheduler/scheduler_kernel_tests.cpp b/opencl/test/unit_test/scheduler/scheduler_kernel_tests.cpp index 1769d0dfe9..9c2e42b44d 100644 --- a/opencl/test/unit_test/scheduler/scheduler_kernel_tests.cpp +++ b/opencl/test/unit_test/scheduler/scheduler_kernel_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/test//common/mocks/mock_ostime.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" @@ -13,7 +14,6 @@ #include "opencl/source/scheduler/scheduler_kernel.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" #include "opencl/test/unit_test/mocks/mock_program.h" #include "test.h" diff --git a/shared/test/common/mocks/CMakeLists.txt b/shared/test/common/mocks/CMakeLists.txt index a26c60dab4..8c65674e62 100644 --- a/shared/test/common/mocks/CMakeLists.txt +++ b/shared/test/common/mocks/CMakeLists.txt @@ -58,6 +58,7 @@ set(NEO_CORE_tests_mocks ${CMAKE_CURRENT_SOURCE_DIR}/mock_migration_sync_data.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_multi_graphics_allocation.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_os_library.h + ${CMAKE_CURRENT_SOURCE_DIR}/mock_ostime.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_physical_address_allocator.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_sip.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_sip.h diff --git a/shared/test/common/mocks/mock_device.cpp b/shared/test/common/mocks/mock_device.cpp index aa692193b2..75bd6acea3 100644 --- a/shared/test/common/mocks/mock_device.cpp +++ b/shared/test/common/mocks/mock_device.cpp @@ -10,13 +10,12 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/os_interface/os_context.h" +#include "shared/test//common/mocks/mock_ostime.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/unit_test/tests_configuration.h" -#include "opencl/test/unit_test/mocks/mock_ostime.h" - using namespace NEO; bool MockDevice::createSingleDevice = true; diff --git a/opencl/test/unit_test/mocks/mock_ostime.h b/shared/test/common/mocks/mock_ostime.h similarity index 100% rename from opencl/test/unit_test/mocks/mock_ostime.h rename to shared/test/common/mocks/mock_ostime.h