mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
Change-Id: Iab6f00ea5cf2595cebc34c18286a6900b90aef92 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
42 lines
894 B
C++
42 lines
894 B
C++
/*
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "core/device/device.h"
|
|
#include "core/execution_environment/execution_environment.h"
|
|
#include "core/os_interface/device_factory.h"
|
|
#include "test.h"
|
|
#include "unit_tests/mocks/mock_device_factory.h"
|
|
#include "unit_tests/mocks/mock_execution_environment.h"
|
|
#include "unit_tests/os_interface/linux/drm_mock.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace NEO {
|
|
void pushDrmMock(Drm *mock);
|
|
void popDrmMock();
|
|
}; // namespace NEO
|
|
|
|
using namespace NEO;
|
|
|
|
struct DeviceFactoryLinuxTest : public ::testing::Test {
|
|
void SetUp() override {
|
|
pDrm = new DrmMock;
|
|
pDrm->setGtType(GTTYPE_GT2);
|
|
pushDrmMock(pDrm);
|
|
}
|
|
|
|
void TearDown() override {
|
|
popDrmMock();
|
|
delete pDrm;
|
|
}
|
|
|
|
DrmMock *pDrm;
|
|
MockExecutionEnvironment executionEnvironment;
|
|
};
|