mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
ULTs cleanup
- removing more occurences of unused MemoryManagerFixture Change-Id: I4d2d03536b26a54024e09877cf1bf48dcbf8559a
This commit is contained in:
committed by
sys_ocldev
parent
cef24fdd4d
commit
0432d117ca
@@ -36,7 +36,6 @@ api_fixture::api_fixture()
|
||||
}
|
||||
|
||||
void api_fixture::SetUp() {
|
||||
MemoryManagementFixture::SetUp();
|
||||
PlatformFixture::SetUp(numPlatformDevices, platformDevices);
|
||||
|
||||
ASSERT_EQ(retVal, CL_SUCCESS);
|
||||
@@ -63,15 +62,12 @@ void api_fixture::TearDown() {
|
||||
|
||||
BuiltInFixture::TearDown();
|
||||
PlatformFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
void api_fixture_using_aligned_memory_manager::SetUp() {
|
||||
retVal = CL_SUCCESS;
|
||||
retSize = 0;
|
||||
|
||||
MemoryManagementFixture::SetUp();
|
||||
|
||||
device = Device::create<MockAlignedMallocManagerDevice>(*platformDevices);
|
||||
Device *devPtr = reinterpret_cast<Device *>(device);
|
||||
cl_device_id clDevice = devPtr;
|
||||
@@ -98,6 +94,5 @@ void api_fixture_using_aligned_memory_manager::TearDown() {
|
||||
delete device;
|
||||
|
||||
BuiltInFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
#include "gtest/gtest.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/fixtures/platform_fixture.h"
|
||||
#include "unit_tests/fixtures/built_in_fixture.h"
|
||||
#include "runtime/api/api.h"
|
||||
@@ -38,8 +37,7 @@ class MockKernel;
|
||||
class MockProgram;
|
||||
class MockAlignedMallocManagerDevice;
|
||||
|
||||
struct api_fixture : public MemoryManagementFixture,
|
||||
public PlatformFixture,
|
||||
struct api_fixture : public PlatformFixture,
|
||||
public BuiltInFixture {
|
||||
using BuiltInFixture::SetUp;
|
||||
using PlatformFixture::SetUp;
|
||||
@@ -70,8 +68,7 @@ struct api_tests : public api_fixture,
|
||||
}
|
||||
};
|
||||
|
||||
struct api_fixture_using_aligned_memory_manager : public MemoryManagementFixture,
|
||||
public BuiltInFixture {
|
||||
struct api_fixture_using_aligned_memory_manager : public BuiltInFixture {
|
||||
using BuiltInFixture::SetUp;
|
||||
|
||||
public:
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/device_queue/device_queue.h"
|
||||
#include "runtime/helpers/base_object.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
@@ -56,16 +57,19 @@ struct CommandQueueWithPropertiesTest : public api_fixture,
|
||||
};
|
||||
|
||||
struct clCreateCommandQueueWithPropertiesApi : public api_fixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
clCreateCommandQueueWithPropertiesApi() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
api_fixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
api_fixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
#include "unit_tests/fixtures/buffer_fixture.h"
|
||||
#include "unit_tests/fixtures/context_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/gen_common/matchers.h"
|
||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "unit_tests/helpers/memory_management.h"
|
||||
#include "unit_tests/mocks/mock_buffer.h"
|
||||
#include "unit_tests/mocks/mock_command_queue.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
@@ -51,8 +51,7 @@
|
||||
using namespace OCLRT;
|
||||
|
||||
struct CommandQueueHwTest
|
||||
: public MemoryManagementFixture,
|
||||
public DeviceFixture,
|
||||
: public DeviceFixture,
|
||||
public ContextFixture,
|
||||
public CommandQueueHwFixture,
|
||||
::testing::Test {
|
||||
@@ -60,7 +59,6 @@ struct CommandQueueHwTest
|
||||
using ContextFixture::SetUp;
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
cl_device_id device = pDevice;
|
||||
ContextFixture::SetUp(1, &device);
|
||||
@@ -71,7 +69,6 @@ struct CommandQueueHwTest
|
||||
CommandQueueHwFixture::TearDown();
|
||||
ContextFixture::TearDown();
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
cl_command_queue_properties properties;
|
||||
|
||||
@@ -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"),
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "unit_tests/fixtures/image_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/image_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_kernel.h"
|
||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||
@@ -794,7 +793,6 @@ TEST_F(EnqueueMapImageTest, givenNonZeroCopyImageWhenMappedOnGpuThenReturnHostRo
|
||||
}
|
||||
|
||||
struct EnqueueMapImageTypeTest : public CommandEnqueueFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
typedef CommandQueueHwFixture CommandQueueFixture;
|
||||
|
||||
@@ -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"),
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "runtime/helpers/ptr_math.h"
|
||||
#include "runtime/helpers/aligned_memory.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "gen_cmd_parse.h"
|
||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||
#include "unit_tests/fixtures/buffer_fixture.h"
|
||||
@@ -33,7 +32,6 @@
|
||||
namespace OCLRT {
|
||||
|
||||
struct EnqueueReadBufferRectTest : public CommandEnqueueFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
EnqueueReadBufferRectTest(void)
|
||||
: buffer(nullptr),
|
||||
@@ -41,7 +39,6 @@ struct EnqueueReadBufferRectTest : public CommandEnqueueFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
CommandEnqueueFixture::SetUp();
|
||||
contextMemoryManager = context.getMemoryManager();
|
||||
context.setMemoryManager(pCmdQ->getDevice().getMemoryManager());
|
||||
@@ -70,7 +67,6 @@ struct EnqueueReadBufferRectTest : public CommandEnqueueFixture,
|
||||
|
||||
context.setMemoryManager(contextMemoryManager);
|
||||
CommandEnqueueFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "unit_tests/libult/ult_command_stream_receiver.h"
|
||||
#include "unit_tests/fixtures/built_in_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "test.h"
|
||||
|
||||
@@ -77,12 +76,10 @@ class CommandStreamReceiverMock : public UltCommandStreamReceiver<FamilyType> {
|
||||
};
|
||||
|
||||
struct EnqueueThreadingFixture : public DeviceFixture,
|
||||
public BuiltInFixture,
|
||||
public MemoryManagementFixture {
|
||||
public BuiltInFixture {
|
||||
using BuiltInFixture::SetUp;
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
void SetUp() {
|
||||
DeviceFixture::SetUp();
|
||||
BuiltInFixture::SetUp(pDevice);
|
||||
context = new MockContext(pDevice);
|
||||
@@ -90,12 +87,11 @@ struct EnqueueThreadingFixture : public DeviceFixture,
|
||||
pCmdQ = nullptr;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void TearDown() {
|
||||
delete pCmdQ;
|
||||
BuiltInFixture::TearDown();
|
||||
context->release();
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
template <typename FamilyType>
|
||||
|
||||
@@ -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/ptr_math.h"
|
||||
#include "runtime/helpers/aligned_memory.h"
|
||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/fixtures/buffer_fixture.h"
|
||||
#include "gen_cmd_parse.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
@@ -34,8 +33,6 @@
|
||||
namespace OCLRT {
|
||||
|
||||
struct EnqueueWriteBufferRectTest : public CommandEnqueueFixture,
|
||||
// public EnqueueWriteBufferRectHelper,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
EnqueueWriteBufferRectTest(void)
|
||||
: buffer(nullptr),
|
||||
@@ -43,7 +40,6 @@ struct EnqueueWriteBufferRectTest : public CommandEnqueueFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
CommandEnqueueFixture::SetUp();
|
||||
|
||||
contextMemoryManager = context.getMemoryManager();
|
||||
@@ -74,7 +70,6 @@ struct EnqueueWriteBufferRectTest : public CommandEnqueueFixture,
|
||||
|
||||
context.setMemoryManager(contextMemoryManager);
|
||||
CommandEnqueueFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -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"),
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||
#include "unit_tests/command_queue/enqueue_fixture.h"
|
||||
#include "unit_tests/fixtures/hello_world_kernel_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/fixtures/simple_arg_kernel_fixture.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/fixtures/buffer_fixture.h"
|
||||
@@ -42,7 +41,6 @@ using namespace OCLRT;
|
||||
struct GetSizeRequiredBufferTest : public CommandEnqueueFixture,
|
||||
public SimpleArgKernelFixture,
|
||||
public HelloWorldKernelFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
using SimpleArgKernelFixture::SetUp;
|
||||
@@ -52,7 +50,6 @@ struct GetSizeRequiredBufferTest : public CommandEnqueueFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
CommandEnqueueFixture::SetUp();
|
||||
SimpleArgKernelFixture::SetUp(pDevice);
|
||||
HelloWorldKernelFixture::SetUp(pDevice, "CopyBuffer_simd", "CopyBuffer");
|
||||
@@ -71,7 +68,6 @@ struct GetSizeRequiredBufferTest : public CommandEnqueueFixture,
|
||||
HelloWorldKernelFixture::TearDown();
|
||||
SimpleArgKernelFixture::TearDown();
|
||||
CommandEnqueueFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
Buffer *srcBuffer = nullptr;
|
||||
|
||||
@@ -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"),
|
||||
@@ -36,21 +36,18 @@
|
||||
#include "unit_tests/command_queue/enqueue_write_image_fixture.h"
|
||||
#include "unit_tests/fixtures/built_in_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/mocks/mock_kernel.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
struct GetSizeRequiredImageTest : public CommandEnqueueFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
GetSizeRequiredImageTest() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
CommandEnqueueFixture::SetUp();
|
||||
|
||||
srcImage = Image2dHelper<>::create(context);
|
||||
@@ -64,7 +61,6 @@ struct GetSizeRequiredImageTest : public CommandEnqueueFixture,
|
||||
delete srcImage;
|
||||
|
||||
CommandEnqueueFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
Image *srcImage = nullptr;
|
||||
|
||||
@@ -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,18 +26,15 @@
|
||||
#include "runtime/command_queue/command_queue_hw.h"
|
||||
#include "runtime/event/event.h"
|
||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
struct GetSizeRequiredTest : public CommandEnqueueFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
CommandEnqueueFixture::SetUp();
|
||||
dsh = &pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||
ioh = &pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT);
|
||||
@@ -52,7 +49,6 @@ struct GetSizeRequiredTest : public CommandEnqueueFixture,
|
||||
|
||||
void TearDown() override {
|
||||
CommandEnqueueFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
MockContext context;
|
||||
|
||||
@@ -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"),
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "unit_tests/command_queue/enqueue_fixture.h"
|
||||
#include "unit_tests/fixtures/built_in_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
@@ -42,8 +41,7 @@ static OOMSetting oomSettings[] = {
|
||||
{false, true},
|
||||
{true, true}};
|
||||
|
||||
struct OOMCommandQueueImageTest : public MemoryManagementFixture,
|
||||
public DeviceFixture,
|
||||
struct OOMCommandQueueImageTest : public DeviceFixture,
|
||||
public CommandQueueFixture,
|
||||
public BuiltInFixture,
|
||||
public ::testing::TestWithParam<OOMSetting> {
|
||||
@@ -55,7 +53,6 @@ struct OOMCommandQueueImageTest : public MemoryManagementFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
context = new MockContext(pDevice);
|
||||
CommandQueueFixture::SetUp(context, pDevice, 0);
|
||||
@@ -91,7 +88,6 @@ struct OOMCommandQueueImageTest : public MemoryManagementFixture,
|
||||
BuiltInFixture::TearDown();
|
||||
CommandQueueFixture::TearDown();
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -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"),
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
#include "unit_tests/command_queue/command_queue_fixture.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "test.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
|
||||
@@ -41,8 +40,7 @@ static OOMSetting oomSettings[] = {
|
||||
{false, true},
|
||||
{true, true}};
|
||||
|
||||
struct OOMCommandQueueTest : public MemoryManagementFixture,
|
||||
public DeviceFixture,
|
||||
struct OOMCommandQueueTest : public DeviceFixture,
|
||||
public CommandQueueFixture,
|
||||
public ::testing::TestWithParam<OOMSetting> {
|
||||
|
||||
@@ -52,7 +50,6 @@ struct OOMCommandQueueTest : public MemoryManagementFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
context = new MockContext(pDevice);
|
||||
CommandQueueFixture::SetUp(context, pDevice, 0);
|
||||
@@ -80,7 +77,6 @@ struct OOMCommandQueueTest : public MemoryManagementFixture,
|
||||
CommandQueueFixture::TearDown();
|
||||
context->release();
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
MockContext *context;
|
||||
|
||||
@@ -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"),
|
||||
@@ -23,23 +23,19 @@
|
||||
#include "hw_cmds.h"
|
||||
#include "runtime/command_queue/dispatch_walker.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
struct WorkGroupSizeBase : public DeviceFixture,
|
||||
public MemoryManagementFixture {
|
||||
struct WorkGroupSizeBase : public DeviceFixture {
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
void SetUp() {
|
||||
DeviceFixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void TearDown() {
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
template <typename FamilyType>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "unit_tests/mocks/mock_buffer.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "unit_tests/indirect_heap/indirect_heap_fixture.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -42,7 +41,6 @@ struct EventTest
|
||||
public CommandQueueFixture,
|
||||
public CommandStreamFixture,
|
||||
public IndirectHeapFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
using CommandQueueFixture::SetUp;
|
||||
@@ -66,22 +64,19 @@ struct EventTest
|
||||
|
||||
struct InternalsEventTest
|
||||
: public DeviceFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
|
||||
InternalsEventTest() {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
void SetUp() {
|
||||
DeviceFixture::SetUp();
|
||||
mockContext = new MockContext(pDevice);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
void TearDown() {
|
||||
delete mockContext;
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
|
||||
MockContext *mockContext;
|
||||
|
||||
@@ -21,21 +21,17 @@
|
||||
*/
|
||||
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
struct Gen8DeviceTest : public DeviceFixture,
|
||||
public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
DeviceFixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
DeviceFixture::TearDown();
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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"),
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include "runtime/sharings/sharing_factory.h"
|
||||
#include "unit_tests/fixtures/memory_management_fixture.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "runtime/helpers/string.h"
|
||||
@@ -58,18 +57,6 @@ class SharingFactoryStateRestore : public SharingFactory {
|
||||
std::vector<std::unique_ptr<SharingBuilderFactory>> sharings;
|
||||
};
|
||||
|
||||
class SharingFactoryTests : public MemoryManagementFixture,
|
||||
public ::testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
MemoryManagementFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
class TestedSharingBuilderFactory : public SharingBuilderFactory {
|
||||
public:
|
||||
std::unique_ptr<SharingContextBuilder> createContextBuilder() override {
|
||||
@@ -97,7 +84,7 @@ TestedSharingBuilderFactory *SharingFactoryStateRestore::getSharing() {
|
||||
return reinterpret_cast<TestedSharingBuilderFactory *>(sharingContextBuilder[SharingType::CLGL_SHARING]);
|
||||
}
|
||||
|
||||
TEST_F(SharingFactoryTests, givenFactoryWithEmptyTableWhenAskedForExtensionThenEmptyStringIsReturned) {
|
||||
TEST(SharingFactoryTests, givenFactoryWithEmptyTableWhenAskedForExtensionThenEmptyStringIsReturned) {
|
||||
SharingFactoryStateRestore stateRestore;
|
||||
|
||||
stateRestore.clearCurrentState();
|
||||
@@ -106,7 +93,7 @@ TEST_F(SharingFactoryTests, givenFactoryWithEmptyTableWhenAskedForExtensionThenE
|
||||
EXPECT_STREQ("", ext.c_str());
|
||||
}
|
||||
|
||||
TEST_F(SharingFactoryTests, givenFactoryWithSharingWhenAskedForExtensionThenStringIsReturned) {
|
||||
TEST(SharingFactoryTests, givenFactoryWithSharingWhenAskedForExtensionThenStringIsReturned) {
|
||||
SharingFactoryStateRestore stateRestore;
|
||||
|
||||
stateRestore.clearCurrentState();
|
||||
@@ -117,7 +104,7 @@ TEST_F(SharingFactoryTests, givenFactoryWithSharingWhenAskedForExtensionThenStri
|
||||
EXPECT_STREQ(TestedSharingBuilderFactory::extension.c_str(), ext.c_str());
|
||||
}
|
||||
|
||||
TEST_F(SharingFactoryTests, givenFactoryWithSharingWhenDispatchFillRequestedThenMethodsAreInvoked) {
|
||||
TEST(SharingFactoryTests, givenFactoryWithSharingWhenDispatchFillRequestedThenMethodsAreInvoked) {
|
||||
SharingFactoryStateRestore stateRestore;
|
||||
|
||||
stateRestore.clearCurrentState();
|
||||
@@ -130,7 +117,7 @@ TEST_F(SharingFactoryTests, givenFactoryWithSharingWhenDispatchFillRequestedThen
|
||||
EXPECT_EQ(1u, sharing->invocationCount);
|
||||
}
|
||||
|
||||
TEST_F(SharingFactoryTests, givenFactoryWithSharingWhenAskedThenAddressIsReturned) {
|
||||
TEST(SharingFactoryTests, givenFactoryWithSharingWhenAskedThenAddressIsReturned) {
|
||||
SharingFactoryStateRestore stateRestore;
|
||||
|
||||
stateRestore.clearCurrentState();
|
||||
|
||||
Reference in New Issue
Block a user