test: respect supported ip versions in aot specific tests

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-06-03 09:03:56 +00:00
committed by Compute-Runtime-Automation
parent 88ed909e57
commit 2919d93778

View File

@@ -250,13 +250,37 @@ TEST_F(ProductConfigHelperTests, GivenDifferentHwInfoInDeviceAotInfosWhenCompari
}
TEST_F(AotDeviceInfoTests, givenProductAcronymWhenHelperSearchForAMatchThenCorrespondingValueIsReturned) {
uint32_t numSupportedAcronyms = 0;
for (const auto &[acronym, value] : AOT::deviceAcronyms) {
if (!productConfigHelper->isSupportedProductConfig(value)) {
continue;
}
numSupportedAcronyms++;
EXPECT_EQ(productConfigHelper->getProductConfigFromDeviceName(acronym), value);
}
for (const auto &[acronym, value] : AOT::rtlIdAcronyms) {
if (!productConfigHelper->isSupportedProductConfig(value)) {
continue;
}
numSupportedAcronyms++;
EXPECT_EQ(productConfigHelper->getProductConfigFromDeviceName(acronym), value);
}
EXPECT_LT(0u, numSupportedAcronyms);
}
TEST_F(AotDeviceInfoTests, givenProductIpVersionStringWhenHelperSearchForProductConfigThenCorrectValueIsReturned) {
for (const auto &deviceConfig : AOT::deviceAcronyms) {
if (!productConfigHelper->isSupportedProductConfig(deviceConfig.second)) {
continue;
}
std::stringstream ipVersion;
ipVersion << deviceConfig.second;
EXPECT_EQ(productConfigHelper->getProductConfigFromDeviceName(ipVersion.str()), deviceConfig.second);
}
for (const auto &deviceConfig : AOT::rtlIdAcronyms) {
if (!productConfigHelper->isSupportedProductConfig(deviceConfig.second)) {
continue;
}
std::stringstream ipVersion;
ipVersion << deviceConfig.second;
EXPECT_EQ(productConfigHelper->getProductConfigFromDeviceName(ipVersion.str()), deviceConfig.second);