mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
Cleanup includes in L0 device fixture
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
93aa139ef1
commit
f02bd9f58c
@@ -8,6 +8,7 @@ set(TARGET_NAME ${TARGET_NAME_L0}_fixtures)
|
||||
|
||||
set(L0_FIXTURES_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_csr_fixture.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_fixture.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_fixture.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_fixture.cpp
|
||||
|
||||
40
level_zero/core/test/unit_tests/fixtures/aub_csr_fixture.h
Normal file
40
level_zero/core/test/unit_tests/fixtures/aub_csr_fixture.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/ult_aub_command_stream_receiver.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace NEO {
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
} // namespace NEO
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
struct AubCsrFixture : public ContextFixture {
|
||||
template <typename T>
|
||||
void SetUpT() {
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[IGFX_MAX_CORE + NEO::defaultHwInfo->platform.eRenderCoreFamily];
|
||||
variableBackup = std::make_unique<VariableBackup<CommandStreamReceiverCreateFunc>>(csrCreateFcn);
|
||||
*csrCreateFcn = UltAubCommandStreamReceiver<T>::create;
|
||||
ContextFixture::SetUp();
|
||||
}
|
||||
template <typename T>
|
||||
void TearDownT() {
|
||||
ContextFixture::TearDown();
|
||||
}
|
||||
|
||||
void SetUp() {}
|
||||
void TearDown() {}
|
||||
std::unique_ptr<VariableBackup<CommandStreamReceiverCreateFunc>> variableBackup;
|
||||
};
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -7,7 +7,9 @@
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/unit_test/page_fault_manager/mock_cpu_page_fault_manager.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_context.h"
|
||||
|
||||
@@ -7,26 +7,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/ult_aub_command_stream_receiver.h"
|
||||
#include "shared/test/common/mocks/mock_compilers.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/unit_test/page_fault_manager/cpu_page_fault_manager_tests_fixture.h"
|
||||
|
||||
#include "level_zero/core/source/context/context_imp.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_driver_handle.h"
|
||||
|
||||
class MockPageFaultManager;
|
||||
namespace NEO {
|
||||
struct UltDeviceFactory;
|
||||
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
|
||||
} // namespace NEO
|
||||
|
||||
namespace L0 {
|
||||
struct Context;
|
||||
struct Device;
|
||||
struct ContextImp;
|
||||
|
||||
namespace ult {
|
||||
class MockBuiltins;
|
||||
@@ -83,24 +79,6 @@ struct ContextFixture : DeviceFixture {
|
||||
void TearDown();
|
||||
};
|
||||
|
||||
struct AubCsrFixture : public ContextFixture {
|
||||
template <typename T>
|
||||
void SetUpT() {
|
||||
auto csrCreateFcn = &commandStreamReceiverFactory[IGFX_MAX_CORE + NEO::defaultHwInfo->platform.eRenderCoreFamily];
|
||||
variableBackup = std::make_unique<VariableBackup<CommandStreamReceiverCreateFunc>>(csrCreateFcn);
|
||||
*csrCreateFcn = UltAubCommandStreamReceiver<T>::create;
|
||||
ContextFixture::SetUp();
|
||||
}
|
||||
template <typename T>
|
||||
void TearDownT() {
|
||||
ContextFixture::TearDown();
|
||||
}
|
||||
|
||||
void SetUp() {}
|
||||
void TearDown() {}
|
||||
std::unique_ptr<VariableBackup<CommandStreamReceiverCreateFunc>> variableBackup;
|
||||
};
|
||||
|
||||
struct MultipleDevicesWithCustomHwInfo {
|
||||
void SetUp();
|
||||
void TearDown() {}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||
#include "level_zero/core/test/unit_tests/mock.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_memory_manager.h"
|
||||
#include "level_zero/core/test/unit_tests/white_box.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/unit_test/page_fault_manager/mock_cpu_page_fault_manager.h"
|
||||
|
||||
#include "test.h"
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "level_zero/core/source/context/context.h"
|
||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/aub_csr_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/module_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_driver_handle.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_memory_manager.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/memory_manager/memory_operations_status.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/test_files.h"
|
||||
#include "shared/test/common/mocks/mock_compilers.h"
|
||||
|
||||
Reference in New Issue
Block a user