test: correct scope of unit test
ensure that getHwRevIdFromStepping is not defined for MTL+ Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
9bb64d0b15
commit
d4f80fb957
|
@ -408,7 +408,7 @@ HWTEST2_F(CommandQueuePvcAndLaterTests, givenQueueWithMainBcsIsReleasedWhenNewQu
|
||||||
EXPECT_EQ(aub_stream::EngineType::ENGINE_BCS1, queue2->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS1)->getOsContext().getEngineType());
|
EXPECT_EQ(aub_stream::EngineType::ENGINE_BCS1, queue2->getBcsCommandStreamReceiver(aub_stream::ENGINE_BCS1)->getOsContext().getEngineType());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(CommandQueuePvcAndLaterTests, givenCooperativeEngineUsageHintAndCcsWhenCreatingCommandQueueThenCreateQueueWithCooperativeEngine, IsAtLeastXeHpcCore) {
|
HWTEST2_F(CommandQueuePvcAndLaterTests, givenCooperativeEngineUsageHintAndCcsWhenCreatingCommandQueueThenCreateQueueWithCooperativeEngine, IsXeHpcCore) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.EnableCopyEngineSelector.set(1);
|
DebugManager.flags.EnableCopyEngineSelector.set(1);
|
||||||
DebugManager.flags.EngineUsageHint.set(static_cast<int32_t>(EngineUsage::Cooperative));
|
DebugManager.flags.EngineUsageHint.set(static_cast<int32_t>(EngineUsage::Cooperative));
|
||||||
|
@ -424,8 +424,7 @@ HWTEST2_F(CommandQueuePvcAndLaterTests, givenCooperativeEngineUsageHintAndCcsWhe
|
||||||
for (auto &revision : revisions) {
|
for (auto &revision : revisions) {
|
||||||
auto hwRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
auto hwRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
hwInfo.platform.usRevId = hwRevId;
|
hwInfo.platform.usRevId = hwRevId;
|
||||||
if (hwRevId == CommonConstants::invalidStepping ||
|
if (!productHelper.isCooperativeEngineSupported(hwInfo)) {
|
||||||
!productHelper.isCooperativeEngineSupported(hwInfo)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -263,6 +263,22 @@ HWTEST_F(ProductHelperTest, givenVariousValuesWhenConvertingHwRevIdAndSteppingTh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct PlatformsWithReleaseHelper {
|
||||||
|
template <PRODUCT_FAMILY productFamily>
|
||||||
|
static constexpr bool isMatched() {
|
||||||
|
return IsAtLeastMtl::isMatched<productFamily>() && !IsXeHpcCore::isMatched<productFamily>();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
HWTEST2_F(ProductHelperTest, whenPlatformsSupportsReleaseHelperThenRevIdFromSteppingsAreNotAvailable, PlatformsWithReleaseHelper) {
|
||||||
|
ASSERT_NE(nullptr, releaseHelper);
|
||||||
|
for (uint32_t testValue = 0; testValue < 0x10; testValue++) {
|
||||||
|
EXPECT_EQ(CommonConstants::invalidStepping, productHelper->getHwRevIdFromStepping(testValue, pInHwInfo));
|
||||||
|
pInHwInfo.platform.usRevId = testValue;
|
||||||
|
EXPECT_EQ(CommonConstants::invalidStepping, productHelper->getSteppingFromHwRevId(pInHwInfo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HWTEST_F(ProductHelperTest, givenVariousValuesWhenGettingAubStreamSteppingFromHwRevIdThenReturnValuesAreCorrect) {
|
HWTEST_F(ProductHelperTest, givenVariousValuesWhenGettingAubStreamSteppingFromHwRevIdThenReturnValuesAreCorrect) {
|
||||||
MockProductHelperHw<IGFX_UNKNOWN> mockProductHelper;
|
MockProductHelperHw<IGFX_UNKNOWN> mockProductHelper;
|
||||||
mockProductHelper.returnedStepping = REVISION_A0;
|
mockProductHelper.returnedStepping = REVISION_A0;
|
||||||
|
|
Loading…
Reference in New Issue