test: improve ocloc test to recognize all device ids

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-10-10 08:20:41 +00:00
committed by Compute-Runtime-Automation
parent a333b048fe
commit a8ab6cb9b4

View File

@@ -566,9 +566,10 @@ TEST_F(MockOfflineCompilerTests, givenDeviceIdsFromDevicesFileWhenInitHwInfoThen
MockOfflineCompiler mockOfflineCompiler;
mockOfflineCompiler.argHelper->getPrinterRef().setSuppressMessages(true);
for (const auto &deviceId : deviceIds) {
mockOfflineCompiler.deviceConfig = AOT::UNKNOWN_ISA;
std::stringstream deviceIDStr;
deviceIDStr << "0x" << std::hex << deviceId;
mockOfflineCompiler.initHardwareInfo(deviceIDStr.str());
EXPECT_EQ(OCLOC_SUCCESS, mockOfflineCompiler.initHardwareInfo(deviceIDStr.str()));
EXPECT_NE(mockOfflineCompiler.deviceConfig, AOT::UNKNOWN_ISA);
}
}