fix: restore createDebugZebin

Related-To: NEO-7213
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-08-11 11:37:44 +00:00
committed by Compute-Runtime-Automation
parent 8c6e720fa3
commit 85c30457b9
4 changed files with 30 additions and 7 deletions

View File

@@ -117,3 +117,20 @@ TEST_F(ProgramWithZebinFixture, givenEmptyDebugDataAndZebinBinaryFormatThenCreat
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(numDevices * sizeof(debugData), retData);
}
TEST_F(ProgramWithZebinFixture, givenZebinFormatAndDebuggerNotAvailableWhenCreatingDebugDataThenCreateDebugZebinIsCalled) {
pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(nullptr);
addEmptyZebin(program.get());
populateProgramWithSegments(program.get());
auto &buildInfo = program->buildInfos[rootDeviceIndex];
buildInfo.debugDataSize = 0u;
buildInfo.debugData.reset(nullptr);
for (auto &device : program->getDevices()) {
program->createDebugData(device);
}
EXPECT_TRUE(program->wasCreateDebugZebinCalled);
EXPECT_FALSE(program->wasProcessDebugDataCalled);
EXPECT_NE(nullptr, program->buildInfos[rootDeviceIndex].debugData);
EXPECT_GT(program->buildInfos[rootDeviceIndex].debugDataSize, 0u);
}