Remove platform() dependency from DrmMock

Change-Id: I58a21dede469da95593e241528459761322c0730
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-09-11 14:18:23 +02:00
parent d40510f398
commit ada57435b4
24 changed files with 176 additions and 63 deletions

View File

@ -18,7 +18,7 @@ struct HwInfoConfigTestLinuxRkl : HwInfoConfigTestLinux {
void SetUp() override {
HwInfoConfigTestLinux::SetUp();
drm = new DrmMock();
drm = new DrmMock(*executionEnvironment->rootDeviceEnvironments[0]);
osInterface->get()->setDrm(drm);
drm->StoredDeviceID = DEVICE_ID_4C8A;
@ -83,7 +83,10 @@ RKLTEST_F(HwInfoConfigTestLinuxRkl, negative) {
TEST(RklHwInfoTests, gtSetupIsCorrect) {
HardwareInfo hwInfo{};
DrmMock drm;
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
DeviceDescriptor device = {0, &hwInfo, &RKL_HW_CONFIG::setupHardwareInfo, GTTYPE_GT1};