mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-23 03:33:13 +08:00
Add a struct for test fixtures with correct method naming convention
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
aed890a219
commit
e6fc458d4b
@@ -71,7 +71,7 @@ struct Dg2AndLaterDispatchWalkerBasicFixture : public LinearStreamFixture {
|
||||
};
|
||||
|
||||
using WalkerDispatchTestDg2AndLater = ::testing::Test;
|
||||
using Dg2AndLaterDispatchWalkerBasicTest = Test<Dg2AndLaterDispatchWalkerBasicFixture>;
|
||||
using Dg2AndLaterDispatchWalkerBasicTest = TestLegacy<Dg2AndLaterDispatchWalkerBasicFixture>;
|
||||
using matcherDG2AndLater = IsAtLeastXeHpgCore;
|
||||
|
||||
HWTEST2_F(WalkerDispatchTestDg2AndLater, whenProgramComputeWalkerThenApplyL3WAForSpecificPlatformAndRevision, matcherDG2AndLater) {
|
||||
|
||||
@@ -86,7 +86,7 @@ struct XeHPAndLaterDispatchWalkerBasicFixture : public LinearStreamFixture {
|
||||
std::unique_ptr<MockKernelWithInternals> kernel;
|
||||
};
|
||||
|
||||
using XeHPAndLaterDispatchWalkerBasicTest = Test<XeHPAndLaterDispatchWalkerBasicFixture>;
|
||||
using XeHPAndLaterDispatchWalkerBasicTest = TestLegacy<XeHPAndLaterDispatchWalkerBasicFixture>;
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenWorkDimOneThenLocalWorkSizeEqualsLocalXDim) {
|
||||
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using BarrierTest = Test<CommandEnqueueFixture>;
|
||||
using BarrierTest = TestLegacy<CommandEnqueueFixture>;
|
||||
|
||||
HWTEST_F(BarrierTest, givenCsrWithHigherLevelThenCommandQueueWhenEnqueueBarrierIsCalledThenCommandQueueAlignsToCsrWithoutSendingAnyCommands) {
|
||||
auto pCmdQ = this->pCmdQ;
|
||||
|
||||
@@ -372,7 +372,7 @@ HWTEST_F(EnqueueCopyBufferToImageStatefulTest, givenBigBufferWhenCopyingBufferTo
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
using OneMipLevelCopyBufferToImageImageTests = Test<OneMipLevelImageFixture>;
|
||||
using OneMipLevelCopyBufferToImageImageTests = TestLegacy<OneMipLevelImageFixture>;
|
||||
|
||||
HWTEST_F(OneMipLevelCopyBufferToImageImageTests, GivenNotMippedImageWhenCopyingBufferToImageThenDoNotProgramDestinationMipLevel) {
|
||||
auto srcBuffer = std::unique_ptr<Buffer>(createBuffer());
|
||||
|
||||
@@ -347,7 +347,7 @@ INSTANTIATE_TEST_CASE_P(MipMapCopyImageTest_GivenImagesWithNonZeroMipLevelsWhenC
|
||||
::testing::ValuesIn(types),
|
||||
::testing::ValuesIn(types)));
|
||||
|
||||
using OneMipLevelCopyImageImageTests = Test<OneMipLevelImageFixture>;
|
||||
using OneMipLevelCopyImageImageTests = TestLegacy<OneMipLevelImageFixture>;
|
||||
|
||||
HWTEST_F(OneMipLevelCopyImageImageTests, GivenNotMippedImageWhenCopyingImageThenDoNotProgramSourceAndDestinationMipLevels) {
|
||||
auto dstImage = std::unique_ptr<Image>(createImage());
|
||||
|
||||
@@ -365,7 +365,7 @@ HWTEST_F(EnqueueCopyImageToBufferStatefulTest, givenBufferWhenCopyingImageToBuff
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
using OneMipLevelCopyImageToBufferImageTests = Test<OneMipLevelImageFixture>;
|
||||
using OneMipLevelCopyImageToBufferImageTests = TestLegacy<OneMipLevelImageFixture>;
|
||||
|
||||
HWTEST_F(OneMipLevelCopyImageToBufferImageTests, GivenNotMippedImageWhenCopyingImageToBufferThenDoNotProgramSourceMipLevel) {
|
||||
auto dstBuffer = std::unique_ptr<Buffer>(createBuffer());
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<EnqueueFillBufferFixture> EnqueueFillBufferCmdTests;
|
||||
typedef TestLegacy<EnqueueFillBufferFixture> EnqueueFillBufferCmdTests;
|
||||
|
||||
HWTEST_F(EnqueueFillBufferCmdTests, WhenFillingBufferThenTaskCountIsAlignedWithCsr) {
|
||||
//this test case assumes IOQ
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
using namespace NEO;
|
||||
|
||||
typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
||||
typedef Test<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
typedef TestLegacy<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
|
||||
TEST_F(EnqueueKernelTest, GivenNullKernelWhenEnqueuingKernelThenInvalidKernelErrorIsReturned) {
|
||||
size_t globalWorkSize[3] = {1, 1, 1};
|
||||
|
||||
@@ -793,7 +793,7 @@ HWTEST_F(EnqueueKernelTests, whenEnqueueingKernelThenCsrCorrectlySetsRequiredThr
|
||||
}
|
||||
|
||||
typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
||||
typedef Test<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
typedef TestLegacy<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
|
||||
template <typename FamilyType>
|
||||
class MyCmdQ : public MockCommandQueueHw<FamilyType> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "opencl/test/unit_test/fixtures/hello_world_fixture.h"
|
||||
|
||||
typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
||||
typedef Test<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
typedef TestLegacy<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
|
||||
HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesSubmissionsAreFlushed) {
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using MarkerTest = Test<CommandEnqueueFixture>;
|
||||
using MarkerTest = TestLegacy<CommandEnqueueFixture>;
|
||||
|
||||
HWTEST_F(MarkerTest, GivenCsrAndCmdqWithSameTaskLevelWhenEnqueingMarkerThenPipeControlIsAdded) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
@@ -33,7 +33,7 @@ class MigrateMemObjectsFixture
|
||||
}
|
||||
};
|
||||
|
||||
typedef Test<MigrateMemObjectsFixture> MigrateMemObjectsTest;
|
||||
typedef TestLegacy<MigrateMemObjectsFixture> MigrateMemObjectsTest;
|
||||
|
||||
TEST_F(MigrateMemObjectsTest, GivenNullEventWhenMigratingEventsThenSuccessIsReturned) {
|
||||
|
||||
|
||||
@@ -632,7 +632,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
||||
}
|
||||
}
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueReadBufferRectWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -720,7 +720,7 @@ HWTEST_F(EnqueueReadBufferTypeTest, givenEnqueueReadBufferNonBlockingWhenAUBDump
|
||||
EXPECT_FALSE(srcBuffer->forceDisallowCPUCopy);
|
||||
}
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueReadBufferWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -1036,7 +1036,7 @@ HWTEST_P(MipMapReadImageTest, GivenImageWithMipLevelNonZeroWhenReadImageIsCalled
|
||||
INSTANTIATE_TEST_CASE_P(MipMapReadImageTest_GivenImageWithMipLevelNonZeroWhenWriteImageIsCalledThenProperMipLevelIsSet,
|
||||
MipMapReadImageTest, ::testing::Values(CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE2D_ARRAY, CL_MEM_OBJECT_IMAGE3D));
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueWriteImageWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@@ -1063,7 +1063,7 @@ HWTEST_F(NegativeFailAllocationTest, givenEnqueueWriteImageWhenHostPtrAllocation
|
||||
EXPECT_EQ(CL_OUT_OF_RESOURCES, retVal);
|
||||
}
|
||||
|
||||
using OneMipLevelReadImageTests = Test<OneMipLevelImageFixture>;
|
||||
using OneMipLevelReadImageTests = TestLegacy<OneMipLevelImageFixture>;
|
||||
|
||||
HWTEST_F(OneMipLevelReadImageTests, GivenNotMippedImageWhenReadingImageThenDoNotProgramSourceMipLevel) {
|
||||
auto queue = createQueue<FamilyType>();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using ResourceBarrierTest = Test<CommandEnqueueFixture>;
|
||||
using ResourceBarrierTest = TestLegacy<CommandEnqueueFixture>;
|
||||
|
||||
HWTEST_F(ResourceBarrierTest, givenNullArgsAndHWCommandQueueWhenEnqueueResourceBarrierCalledThenCorrectStatusReturned) {
|
||||
cl_resource_barrier_descriptor_intel descriptor{};
|
||||
|
||||
@@ -133,7 +133,7 @@ struct EnqueueThreadingFixture : public ClDeviceFixture {
|
||||
}
|
||||
};
|
||||
|
||||
typedef Test<EnqueueThreadingFixture> EnqueueThreading;
|
||||
typedef TestLegacy<EnqueueThreadingFixture> EnqueueThreading;
|
||||
|
||||
struct EnqueueThreadingImage : EnqueueThreading {
|
||||
void SetUp() override {
|
||||
|
||||
@@ -631,7 +631,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
||||
}
|
||||
}
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueWriteBufferRectWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -505,7 +505,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, givenEnqueueWriteBufferCalledWhenLockedPtrI
|
||||
EXPECT_EQ(0u, memoryManager.unlockResourceCalled);
|
||||
}
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueWriteBufferWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
@@ -514,7 +514,7 @@ HWTEST_P(MipMapWriteImageTest, GivenImageWithMipLevelNonZeroWhenReadImageIsCalle
|
||||
INSTANTIATE_TEST_CASE_P(MipMapWriteImageTest_GivenImageWithMipLevelNonZeroWhenReadImageIsCalledThenProperMipLevelIsSet,
|
||||
MipMapWriteImageTest, ::testing::Values(CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE2D_ARRAY, CL_MEM_OBJECT_IMAGE3D));
|
||||
|
||||
using NegativeFailAllocationTest = Test<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
using NegativeFailAllocationTest = TestLegacy<NegativeFailAllocationCommandEnqueueBaseFixture>;
|
||||
|
||||
HWTEST_F(NegativeFailAllocationTest, givenEnqueueReadImageWhenHostPtrAllocationCreationFailsThenReturnOutOfResource) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
@@ -541,7 +541,7 @@ HWTEST_F(NegativeFailAllocationTest, givenEnqueueReadImageWhenHostPtrAllocationC
|
||||
EXPECT_EQ(CL_OUT_OF_RESOURCES, retVal);
|
||||
}
|
||||
|
||||
using OneMipLevelWriteImageTests = Test<OneMipLevelImageFixture>;
|
||||
using OneMipLevelWriteImageTests = TestLegacy<OneMipLevelImageFixture>;
|
||||
|
||||
HWTEST_F(OneMipLevelWriteImageTests, GivenNotMippedImageWhenWritingImageThenDoNotProgramDestinationMipLevel) {
|
||||
auto queue = createQueue<FamilyType>();
|
||||
|
||||
@@ -41,7 +41,7 @@ struct FinishFixture : public ClDeviceFixture,
|
||||
}
|
||||
};
|
||||
|
||||
typedef Test<FinishFixture> FinishTest;
|
||||
typedef TestLegacy<FinishFixture> FinishTest;
|
||||
|
||||
HWTEST_F(FinishTest, GivenCsGreaterThanCqWhenFinishIsCalledThenPipeControlIsNotAdded) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
using namespace NEO;
|
||||
|
||||
typedef HelloWorldFixture<HelloWorldFixtureFactory> EnqueueKernelFixture;
|
||||
typedef Test<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
typedef TestLegacy<EnqueueKernelFixture> EnqueueKernelTest;
|
||||
|
||||
TEST_F(EnqueueKernelTest, givenKernelWithSharedObjArgsWhenEnqueueIsCalledThenResetPatchAddress) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
class ZeroSizeEnqueueHandlerTest : public Test<ClDeviceFixture> {
|
||||
class ZeroSizeEnqueueHandlerTest : public TestLegacy<ClDeviceFixture> {
|
||||
public:
|
||||
MockContext context;
|
||||
cl_int retVal;
|
||||
|
||||
Reference in New Issue
Block a user