Improve UnitTestHelper

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-11-30 18:32:05 +00:00
committed by Compute-Runtime-Automation
parent 9686bd2636
commit 64bba71abb
7 changed files with 28 additions and 35 deletions

View File

@@ -1352,7 +1352,7 @@ HWTEST_F(TimestampPacketTests, givenAlreadyAssignedNodeWhenEnqueueingThenDontKee
atomicsFound++;
}
}
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo()) ? 2 : 0);
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired() ? 2 : 0);
EXPECT_EQ(expectedSemaphoresCount, semaphoresFound);
EXPECT_EQ(0u, atomicsFound);
}
@@ -1418,7 +1418,7 @@ HWTEST_F(TimestampPacketTests, givenAlreadyAssignedNodeWhenEnqueueingToOoqThenDo
atomicsFound++;
}
}
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo()) ? 2 : 0);
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired() ? 2 : 0);
EXPECT_EQ(expectedSemaphoresCount, semaphoresFound);
EXPECT_EQ(0u, atomicsFound);
}
@@ -1449,7 +1449,7 @@ HWTEST_F(TimestampPacketTests, givenAlreadyAssignedNodeWhenEnqueueingWithOmitTim
atomicsFound++;
}
}
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo()) ? 2 : 0);
uint32_t expectedSemaphoresCount = (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired() ? 2 : 0);
EXPECT_EQ(expectedSemaphoresCount, semaphoresFound);
EXPECT_EQ(0u, atomicsFound);
}
@@ -1689,7 +1689,7 @@ HWTEST_F(TimestampPacketTests, givenBlockedEnqueueWithoutKernelWhenSubmittingThe
auto queueSemaphores = findAll<MI_SEMAPHORE_WAIT *>(hwParserCmdQ.cmdList.begin(), hwParserCmdQ.cmdList.end());
auto expectedQueueSemaphoresCount = 1u;
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo())) {
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired()) {
expectedQueueSemaphoresCount += 2;
}
EXPECT_EQ(expectedQueueSemaphoresCount, queueSemaphores.size());
@@ -1743,7 +1743,7 @@ HWTEST_F(TimestampPacketTests, givenWaitlistAndOutputEventWhenEnqueueingMarkerWi
auto queueSemaphores = findAll<MI_SEMAPHORE_WAIT *>(hwParserCmdQ.cmdList.begin(), hwParserCmdQ.cmdList.end());
auto expectedQueueSemaphoresCount = 1u;
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo())) {
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired()) {
expectedQueueSemaphoresCount += 2;
}
EXPECT_EQ(expectedQueueSemaphoresCount, queueSemaphores.size());
@@ -1786,7 +1786,7 @@ HWTEST_F(TimestampPacketTests, givenWaitlistAndOutputEventWhenEnqueueingBarrierW
auto queueSemaphores = findAll<MI_SEMAPHORE_WAIT *>(hwParserCmdQ.cmdList.begin(), hwParserCmdQ.cmdList.end());
auto expectedQueueSemaphoresCount = 1u;
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired(device->getHardwareInfo())) {
if (UnitTestHelper<FamilyType>::isAdditionalMiSemaphoreWaitRequired()) {
expectedQueueSemaphoresCount += 2;
}
EXPECT_EQ(expectedQueueSemaphoresCount, queueSemaphores.size());