Remove redundant mock class

Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-06-06 17:05:35 +02:00
committed by Compute-Runtime-Automation
parent 4d6169ee8b
commit cd2f36db5f
6 changed files with 24 additions and 78 deletions

View File

@@ -59,14 +59,14 @@ class DrmMemoryManagerLocalMemoryTest : public ::testing::Test {
class DrmMemoryManagerLocalMemoryWithCustomMockTest : public ::testing::Test {
public:
DrmMockCustomImpl *mock;
DrmMockCustom *mock;
void SetUp() override {
const bool localMemoryEnabled = true;
executionEnvironment = new ExecutionEnvironment;
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
mock = new DrmMockCustomImpl(*executionEnvironment->rootDeviceEnvironments[0]);
mock = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
@@ -776,7 +776,7 @@ TEST_F(DrmMemoryManagerCopyMemoryToAllocationTest, givenDrmMemoryManagerWhenCopy
using DrmMemoryManagerTestImpl = Test<DrmMemoryManagerFixtureImpl>;
HWTEST2_F(DrmMemoryManagerTestImpl, givenDrmMemoryManagerWhenLockUnlockIsCalledOnAllocationInLocalMemoryThenCallIoctlGemMapOffsetAndReturnLockedPtr, NonDefaultIoctlsSupported) {
mockExp->ioctlImpl_expected.gemCreateExt = 1;
mockExp->ioctl_expected.gemCreateExt = 1;
mockExp->ioctl_expected.gemWait = 1;
mockExp->ioctl_expected.gemClose = 1;
mockExp->ioctl_expected.gemMmapOffset = 1;

View File

@@ -8,14 +8,13 @@
#pragma once
#include "shared/test/common/helpers/ult_hw_config.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/os_interface/linux/device_command_stream_fixture_impl.h"
#include "shared/test/common/os_interface/linux/drm_memory_manager_tests.h"
namespace NEO {
class DrmMemoryManagerFixtureImpl : public DrmMemoryManagerFixture {
public:
DrmMockCustomImpl *mockExp;
DrmMockCustom *mockExp;
void SetUp() override {
backup = std::make_unique<VariableBackup<UltHwConfig>>(&ultHwConfig);
@@ -23,7 +22,7 @@ class DrmMemoryManagerFixtureImpl : public DrmMemoryManagerFixture {
MemoryManagementFixture::SetUp();
executionEnvironment = MockDevice::prepareExecutionEnvironment(defaultHwInfo.get(), numRootDevices - 1);
mockExp = new DrmMockCustomImpl(*executionEnvironment->rootDeviceEnvironments[0]);
mockExp = new DrmMockCustom(*executionEnvironment->rootDeviceEnvironments[0]);
DrmMemoryManagerFixture::SetUp(mockExp, true);
}