mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Remove usage of TestLegacy from opencl tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
44d218e52e
commit
bca852617c
@@ -29,16 +29,16 @@ class BufferSetArgTest : public ContextFixture,
|
||||
public ClDeviceFixture,
|
||||
public testing::Test {
|
||||
|
||||
using ContextFixture::SetUp;
|
||||
using ContextFixture::setUp;
|
||||
|
||||
public:
|
||||
BufferSetArgTest() {}
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
cl_device_id device = pClDevice;
|
||||
ContextFixture::SetUp(1, &device);
|
||||
ContextFixture::setUp(1, &device);
|
||||
pKernelInfo = std::make_unique<MockKernelInfo>();
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 1;
|
||||
|
||||
@@ -73,8 +73,8 @@ class BufferSetArgTest : public ContextFixture,
|
||||
delete pMultiDeviceKernel;
|
||||
|
||||
delete pProgram;
|
||||
ContextFixture::TearDown();
|
||||
ClDeviceFixture::TearDown();
|
||||
ContextFixture::tearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -616,9 +616,9 @@ struct CompressedBuffersTests : public ::testing::Test {
|
||||
for (auto &rootDeviceEnvironment : executionEnvironment->rootDeviceEnvironments) {
|
||||
rootDeviceEnvironment->initGmm();
|
||||
}
|
||||
SetUp(executionEnvironment);
|
||||
setUp(executionEnvironment);
|
||||
}
|
||||
void SetUp(ExecutionEnvironment *executionEnvironment) {
|
||||
void setUp(ExecutionEnvironment *executionEnvironment) {
|
||||
hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
device = std::make_unique<MockClDevice>(MockDevice::create<MockDevice>(executionEnvironment, 0u));
|
||||
context = std::make_unique<MockContext>(device.get(), true);
|
||||
@@ -764,7 +764,7 @@ struct CompressedBuffersSvmTests : public CompressedBuffersTests {
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1u);
|
||||
hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
hwInfo->capabilityTable.gpuAddressSpace = MemoryConstants::max48BitAddress;
|
||||
CompressedBuffersTests::SetUp(executionEnvironment);
|
||||
CompressedBuffersTests::setUp(executionEnvironment);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -860,13 +860,13 @@ class BufferTest : public ClDeviceFixture,
|
||||
protected:
|
||||
void SetUp() override {
|
||||
flags = GetParam();
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context.reset(new MockContext(pClDevice));
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
context.reset();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@@ -998,7 +998,7 @@ struct ValidHostPtr
|
||||
public MemoryManagementFixture {
|
||||
typedef BufferTest BaseClass;
|
||||
|
||||
using BufferTest::SetUp;
|
||||
using BufferTest::setUp;
|
||||
using MemoryManagementFixture::setUp;
|
||||
|
||||
ValidHostPtr() {
|
||||
@@ -1886,10 +1886,10 @@ INSTANTIATE_TEST_CASE_P(
|
||||
|
||||
struct BufferUnmapTest : public ClDeviceFixture, public ::testing::Test {
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
}
|
||||
void TearDown() override {
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
using namespace NEO;
|
||||
|
||||
class GetMemObjectInfo : public ::testing::Test, public PlatformFixture, public ClDeviceFixture {
|
||||
using ClDeviceFixture::SetUp;
|
||||
using PlatformFixture::SetUp;
|
||||
using ClDeviceFixture::setUp;
|
||||
using PlatformFixture::setUp;
|
||||
|
||||
public:
|
||||
void SetUp() override {
|
||||
PlatformFixture::SetUp();
|
||||
ClDeviceFixture::SetUp();
|
||||
PlatformFixture::setUp();
|
||||
ClDeviceFixture::setUp();
|
||||
BufferDefaults::context = new MockContext;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
delete BufferDefaults::context;
|
||||
ClDeviceFixture::TearDown();
|
||||
PlatformFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
PlatformFixture::tearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class CreateImage1DTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
types = GetParam();
|
||||
|
||||
// clang-format off
|
||||
@@ -59,7 +59,7 @@ class CreateImage1DTest : public ClDeviceFixture,
|
||||
clReleaseMemObject(imageDesc.mem_object);
|
||||
}
|
||||
delete context;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_image_format imageFormat;
|
||||
|
||||
@@ -25,7 +25,7 @@ class CreateImage2DTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
types = GetParam();
|
||||
|
||||
// clang-format off
|
||||
@@ -52,7 +52,7 @@ class CreateImage2DTest : public ClDeviceFixture,
|
||||
|
||||
void TearDown() override {
|
||||
delete context;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
Image *createImageWithFlags(cl_mem_flags flags) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(
|
||||
|
||||
@@ -26,7 +26,7 @@ class CreateImage3DTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context = new MockContext(pClDevice);
|
||||
|
||||
// clang-format off
|
||||
@@ -48,7 +48,7 @@ class CreateImage3DTest : public ClDeviceFixture,
|
||||
|
||||
void TearDown() override {
|
||||
delete context;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_image_format imageFormat;
|
||||
|
||||
@@ -26,7 +26,7 @@ class ImageArraySizeTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
types = GetParam();
|
||||
|
||||
// clang-format off
|
||||
@@ -57,7 +57,7 @@ class ImageArraySizeTest : public ClDeviceFixture,
|
||||
clReleaseMemObject(imageDesc.mem_object);
|
||||
}
|
||||
delete context;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_image_format imageFormat;
|
||||
|
||||
@@ -62,7 +62,7 @@ class ImageSetArgTest : public ClDeviceFixture,
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
pKernelInfo = std::make_unique<MockKernelInfo>();
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 1;
|
||||
|
||||
@@ -98,7 +98,7 @@ class ImageSetArgTest : public ClDeviceFixture,
|
||||
delete pMultiDeviceKernel;
|
||||
|
||||
delete context;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@@ -918,7 +918,7 @@ HWTEST_F(ImageSetArgTest, givenNonCompressedResourceWhenSettingImgArgThenDontSet
|
||||
class ImageMediaBlockSetArgTest : public ImageSetArgTest {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
pKernelInfo = std::make_unique<MockKernelInfo>();
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 1;
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ class CreateImageTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
|
||||
CommandQueueFixture::SetUp(pClDevice, 0);
|
||||
CommandQueueFixture::setUp(pClDevice, 0);
|
||||
flags = GetParam();
|
||||
|
||||
// clang-format off
|
||||
@@ -81,8 +81,8 @@ class CreateImageTest : public ClDeviceFixture,
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
CommandQueueFixture::TearDown();
|
||||
ClDeviceFixture::TearDown();
|
||||
CommandQueueFixture::tearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_image_format imageFormat;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,7 +16,7 @@ using namespace NEO;
|
||||
|
||||
struct ImageTestsTgllAndLater : ClDeviceFixture, testing::Test {
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context = std::make_unique<MockContext>(pClDevice);
|
||||
srcImage = std::unique_ptr<Image>(Image3dHelper<>::create(context.get()));
|
||||
}
|
||||
@@ -24,7 +24,7 @@ struct ImageTestsTgllAndLater : ClDeviceFixture, testing::Test {
|
||||
void TearDown() override {
|
||||
srcImage.reset();
|
||||
context.reset();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
std::unique_ptr<MockContext> context{};
|
||||
|
||||
@@ -35,8 +35,8 @@ class CreateTiledImageTest : public ClDeviceFixture,
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
ClDeviceFixture::SetUp();
|
||||
CommandQueueFixture::SetUp(pClDevice, 0);
|
||||
ClDeviceFixture::setUp();
|
||||
CommandQueueFixture::setUp(pClDevice, 0);
|
||||
type = GetParam();
|
||||
|
||||
// clang-format off
|
||||
@@ -57,8 +57,8 @@ class CreateTiledImageTest : public ClDeviceFixture,
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
CommandQueueFixture::TearDown();
|
||||
ClDeviceFixture::TearDown();
|
||||
CommandQueueFixture::tearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_image_format imageFormat;
|
||||
|
||||
@@ -58,13 +58,13 @@ class ExportBufferTests : public ClDeviceFixture,
|
||||
protected:
|
||||
void SetUp() override {
|
||||
flags = CL_MEM_READ_WRITE;
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context.reset(new MockContext(pClDevice));
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
context.reset();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -37,7 +37,7 @@ class SubBufferTest : public ClDeviceFixture,
|
||||
|
||||
void TearDown() override {
|
||||
delete buffer;
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -49,13 +49,13 @@ class ExportBufferTests : public ClDeviceFixture,
|
||||
protected:
|
||||
void SetUp() override {
|
||||
flags = CL_MEM_READ_WRITE;
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
context.reset(new MockContext(pClDevice));
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
context.reset();
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -32,11 +32,11 @@ class ZeroCopyBufferTest : public ClDeviceFixture,
|
||||
if (sizeToAlloc > 0) {
|
||||
host_ptr = (void *)alignedMalloc(sizeToAlloc, alignment);
|
||||
}
|
||||
ClDeviceFixture::SetUp();
|
||||
ClDeviceFixture::setUp();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
ClDeviceFixture::TearDown();
|
||||
ClDeviceFixture::tearDown();
|
||||
alignedFree(host_ptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user