mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: dump zebin when building program
- when unpackSingleDeviceBinary is not called zebin should be dumped if debug key is set Related-To: NEO-14153 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
58fe89e116
commit
cc308719d8
@@ -33,6 +33,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/helpers/kernel_binary_helper.h"
|
||||
#include "shared/test/common/helpers/mock_file_io.h"
|
||||
#include "shared/test/common/helpers/test_files.h"
|
||||
#include "shared/test/common/libult/global_environment.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
@@ -1018,6 +1019,26 @@ TEST_F(ProgramFromSourceTest, WhenCompilingProgramWithOpenClC30ThenFeaturesAreAd
|
||||
EXPECT_TRUE(hasSubstr(pCompilerInterface->buildInternalOptions, extensionsWithFeaturesOption));
|
||||
}
|
||||
|
||||
TEST_F(ProgramFromSourceTest, GivenDumpZEBinWhenBuildingProgramFromSourceThenZebinIsDumped) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.DumpZEBin.set(1);
|
||||
|
||||
KernelBinaryHelper kbHelper(binaryFileName, true);
|
||||
|
||||
createProgramWithSource(
|
||||
pContext,
|
||||
sourceFileName);
|
||||
|
||||
std::string fileName = "dumped_zebin_module.elf";
|
||||
EXPECT_FALSE(virtualFileExists(fileName));
|
||||
|
||||
retVal = pProgram->build(pProgram->getDevices(), nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
EXPECT_TRUE(virtualFileExists(fileName));
|
||||
removeVirtualFile(fileName);
|
||||
}
|
||||
|
||||
class Callback {
|
||||
public:
|
||||
Callback() {
|
||||
|
||||
Reference in New Issue
Block a user