Skip to content

Commit dc6a352

Browse files
Remove platform references from mock_aub_center_fixture.h
Related-To: NEO-5894 Signed-off-by: Piotr Obst <[email protected]>
1 parent dc41512 commit dc6a352

File tree

12 files changed

+22
-8
lines changed

12 files changed

+22
-8
lines changed

level_zero/core/test/unit_tests/sources/image/test_image.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
2121
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"
2222

23+
#include "third_party/opencl_headers/CL/cl_ext_intel.h"
24+
2325
namespace L0 {
2426
namespace ult {
2527

opencl/source/platform/platform.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77

88
#pragma once
9+
#include "shared/source/helpers/common_types.h"
10+
911
#include "opencl/source/api/cl_types.h"
1012
#include "opencl/source/cl_device/cl_device_vector.h"
1113
#include "opencl/source/helpers/base_object.h"
@@ -30,7 +32,6 @@ struct OpenCLObjectMapper<_cl_platform_id> {
3032
typedef class Platform DerivedType;
3133
};
3234

33-
using DeviceVector = std::vector<std::unique_ptr<Device>>;
3435
class Platform : public BaseObject<_cl_platform_id> {
3536
public:
3637
static const cl_ulong objectMagic = 0x8873ACDEF2342133LL;

opencl/test/unit_test/api/cl_create_context_from_type_tests.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
9+
#include "opencl/test/unit_test/mocks/mock_platform.h"
910
#include "test.h"
1011

1112
using namespace NEO;

opencl/test/unit_test/execution_environment/execution_environment_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "opencl/test/unit_test/mocks/mock_async_event_handler.h"
2828
#include "opencl/test/unit_test/mocks/mock_cl_execution_environment.h"
2929
#include "opencl/test/unit_test/mocks/mock_memory_manager.h"
30+
#include "opencl/test/unit_test/mocks/mock_platform.h"
3031
#include "test.h"
3132

3233
using namespace NEO;

opencl/test/unit_test/fixtures/memory_allocator_fixture.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "opencl/test/unit_test/fixtures/memory_management_fixture.h"
1717
#include "opencl/test/unit_test/mocks/mock_memory_manager.h"
18+
#include "opencl/test/unit_test/mocks/mock_platform.h"
1819

1920
using namespace NEO;
2021

opencl/test/unit_test/helpers/timestamp_packet_tests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
1515
#include "opencl/test/unit_test/mocks/mock_context.h"
1616
#include "opencl/test/unit_test/mocks/mock_kernel.h"
17+
#include "opencl/test/unit_test/mocks/mock_platform.h"
1718
#include "test.h"
1819

1920
using namespace NEO;

opencl/test/unit_test/mocks/mock_cl_device.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include "shared/test/common/mocks/mock_device.h"
1111

12+
#include "opencl/test/unit_test/mocks/mock_platform.h"
13+
1214
using namespace NEO;
1315

1416
bool &MockClDevice::createSingleDevice = MockDevice::createSingleDevice;

opencl/test/unit_test/os_interface/linux/device_os_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
1717
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
1818
#include "opencl/test/unit_test/mocks/mock_context.h"
19+
#include "opencl/test/unit_test/mocks/mock_platform.h"
1920

2021
#include "gmock/gmock.h"
2122
#include "gtest/gtest.h"

shared/source/helpers/common_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ namespace NEO {
1313
struct EngineControl;
1414
using EngineControlContainer = std::vector<EngineControl>;
1515
using DeviceBitfield = std::bitset<32>;
16+
class Device;
17+
using DeviceVector = std::vector<std::unique_ptr<Device>>;
1618

1719
enum class DebugPauseState : uint32_t {
1820
disabled,

shared/test/common/os_interface/windows/wddm_fixture.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "shared/source/os_interface/windows/os_context_win.h"
1717
#include "shared/source/os_interface/windows/os_environment_win.h"
1818
#include "shared/source/os_interface/windows/wddm_memory_operations_handler.h"
19+
#include "shared/test/common/fixtures/device_fixture.h"
1920
#include "shared/test/common/fixtures/mock_execution_environment_gmm_fixture.h"
2021
#include "shared/test/common/helpers/default_hw_info.h"
2122
#include "shared/test/common/mocks/mock_execution_environment.h"
@@ -100,9 +101,10 @@ struct WddmFixtureWithMockGdiDll : public GdiDllFixture, public MockExecutionEnv
100101
RootDeviceEnvironment *rootDeviceEnvironment = nullptr;
101102
};
102103

103-
struct WddmInstrumentationGmmFixture {
104+
struct WddmInstrumentationGmmFixture : DeviceFixture {
104105
void SetUp() {
105-
executionEnvironment = platform()->peekExecutionEnvironment();
106+
DeviceFixture::SetUp();
107+
executionEnvironment = pDevice->getExecutionEnvironment();
106108
auto rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
107109
wddm = static_cast<WddmMock *>(Wddm::createWddm(nullptr, *rootDeviceEnvironment));
108110
gmmMem = new ::testing::NiceMock<GmockGmmMemory>(rootDeviceEnvironment->getGmmClientContext());
@@ -111,6 +113,7 @@ struct WddmInstrumentationGmmFixture {
111113
rootDeviceEnvironment->osInterface->setDriverModel(std::unique_ptr<DriverModel>(wddm));
112114
}
113115
void TearDown() {
116+
DeviceFixture::TearDown();
114117
}
115118

116119
WddmMock *wddm;

0 commit comments

Comments
 (0)