mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
ULTs: more MemoryManagementFixture cleanup
Change-Id: Iaeb60c9c9e22baf63ff01419a5a6dde1e1652a47
This commit is contained in:
committed by
sys_ocldev
parent
6e005f716c
commit
bdcaf332ce
@@ -28,7 +28,6 @@
|
||||
#include <runtime/helpers/aligned_memory.h>
|
||||
#include <unit_tests/global_environment.h>
|
||||
#include <unit_tests/fixtures/device_fixture.h>
|
||||
#include <unit_tests/fixtures/memory_management_fixture.h>
|
||||
#include <unit_tests/mocks/mock_context.h>
|
||||
#include <unit_tests/mocks/mock_program.h>
|
||||
|
||||
@@ -41,18 +40,16 @@
|
||||
using namespace OCLRT;
|
||||
using namespace std;
|
||||
|
||||
class BinaryCacheFixture : public MemoryManagementFixture
|
||||
class BinaryCacheFixture
|
||||
|
||||
{
|
||||
public:
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
void SetUp() {
|
||||
cache = new BinaryCache;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void TearDown() {
|
||||
delete cache;
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
BinaryCache *cache;
|
||||
};
|
||||
@@ -102,20 +99,17 @@ class BinaryCacheMock : public BinaryCache {
|
||||
bool loadResult = false;
|
||||
};
|
||||
|
||||
class CompilerInterfaceCachedFixture : public MemoryManagementFixture,
|
||||
public DeviceFixture {
|
||||
class CompilerInterfaceCachedFixture : public DeviceFixture {
|
||||
public:
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
void SetUp() {
|
||||
DeviceFixture::SetUp();
|
||||
pCompilerInterface = TestedCompilerInterface::getInstance();
|
||||
ASSERT_NE(pCompilerInterface, nullptr);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void TearDown() {
|
||||
TestedCompilerInterface::shutdown();
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
CompilerInterface *pCompilerInterface;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "runtime/helpers/file_io.h"
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/global_environment.h"
|
||||
#include "unit_tests/helpers/test_files.h"
|
||||
#include "unit_tests/helpers/memory_management.h"
|
||||
@@ -47,8 +46,7 @@ const char *gCBadDompilerDllName = "libbad_compiler.so";
|
||||
#error "Unknown OS!"
|
||||
#endif
|
||||
|
||||
class CompilerInterfaceTest : public MemoryManagementFixture,
|
||||
public DeviceFixture,
|
||||
class CompilerInterfaceTest : public DeviceFixture,
|
||||
public ::testing::Test {
|
||||
public:
|
||||
CompilerInterfaceTest() {
|
||||
@@ -56,7 +54,6 @@ class CompilerInterfaceTest : public MemoryManagementFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
|
||||
retVal = CL_SUCCESS;
|
||||
@@ -102,7 +99,6 @@ class CompilerInterfaceTest : public MemoryManagementFixture,
|
||||
pCompilerInterface.reset();
|
||||
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
std::unique_ptr<MockCompilerInterface> pCompilerInterface = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user