Reverse logic of creating Memory Manager - part 5

-Remove a Drm* parameter from the DrmMemoryManager constructor

Change-Id: Idb6faccdbb512691a8b14f86cdd935d1a8374a23
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-03-25 13:12:55 +01:00
committed by sys_ocldev
parent 047f2bec87
commit e42e952d21
12 changed files with 122 additions and 137 deletions

View File

@@ -7,6 +7,7 @@
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/os_interface/linux/drm_memory_manager.h"
#include "runtime/os_interface/linux/os_interface.h"
#include "unit_tests/mocks/linux/mock_drm_memory_manager.h"
#include "unit_tests/os_interface/linux/device_command_stream_fixture.h"
@@ -33,8 +34,10 @@ TEST(DrmMemoryManagerTest, givenDrmMemoryManagerWhenSharedAllocationIsCreatedFro
}
};
ExecutionEnvironment executionEnvironment;
executionEnvironment.osInterface = std::make_unique<OSInterface>();
auto mock = make_unique<MockDrm>(0);
auto memoryManager = make_unique<TestedDrmMemoryManager>(mock.get(), executionEnvironment);
executionEnvironment.osInterface->get()->setDrm(mock.get());
auto memoryManager = make_unique<TestedDrmMemoryManager>(executionEnvironment);
osHandle handle = 3;
constexpr size_t maxThreads = 10;
@@ -95,8 +98,10 @@ TEST(DrmMemoryManagerTest, givenMultipleThreadsWhenSharedAllocationIsCreatedThen
};
ExecutionEnvironment executionEnvironment;
executionEnvironment.osInterface = std::make_unique<OSInterface>();
auto mock = make_unique<MockDrm>(0);
auto memoryManager = make_unique<TestedDrmMemoryManager>(mock.get(), executionEnvironment);
executionEnvironment.osInterface->get()->setDrm(mock.get());
auto memoryManager = make_unique<TestedDrmMemoryManager>(executionEnvironment);
osHandle handle = 3;
constexpr size_t maxThreads = 10;