mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Cleanup linux dll tests
- include headers from absolute paths - restore changed global state in TearDown() Change-Id: I81fab71aabc0df9d995928e75611681288951916 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
|
||||
#include "runtime/os_interface/linux/drm_null_device.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "unit_tests/linux/mock_os_layer.h"
|
||||
|
||||
#include "mock_os_layer.h"
|
||||
#include <memory>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -26,12 +28,6 @@ class DrmWrap : public Drm {
|
||||
class DrmNullDeviceTestsFixture {
|
||||
public:
|
||||
void SetUp() {
|
||||
oldFlag = DebugManager.flags.EnableNullHardware.get();
|
||||
|
||||
// Make global staff into init state
|
||||
DrmWrap::closeDevice(0);
|
||||
resetOSMockGlobalState();
|
||||
|
||||
// Create nullDevice drm
|
||||
DebugManager.flags.EnableNullHardware.set(true);
|
||||
DrmWrap::createDrm(0);
|
||||
@@ -44,13 +40,12 @@ class DrmNullDeviceTestsFixture {
|
||||
void TearDown() {
|
||||
// Close drm
|
||||
DrmWrap::closeDevice(0);
|
||||
DebugManager.flags.EnableNullHardware.set(oldFlag);
|
||||
}
|
||||
|
||||
Drm *drmNullDevice;
|
||||
|
||||
protected:
|
||||
bool oldFlag;
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
};
|
||||
|
||||
typedef Test<DrmNullDeviceTestsFixture> DrmNullDeviceTests;
|
||||
|
||||
Reference in New Issue
Block a user