mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
test: Mock filesystem in ults 10/n
Related-To: NEO-15069 Signed-off-by: Arek G <arkadiusz.grubba@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
81eed49911
commit
278eb36d44
@@ -351,7 +351,7 @@ HWTEST_F(ModuleWithZebinAndL0DebuggerTest, GivenZebinDebugDataWhenInitializingMo
|
||||
}
|
||||
|
||||
HWTEST_F(ModuleWithZebinAndL0DebuggerTest, GivenDumpElfFlagAndZebinWhenInitializingModuleThenDebugElfIsDumpedToFile) {
|
||||
USE_REAL_FILE_SYSTEM();
|
||||
FORBID_REAL_FILE_SYSTEM_CALLS();
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.DebuggerLogBitmask.set(NEO::DebugVariables::DEBUGGER_LOG_BITMASK::DUMP_ELF);
|
||||
|
||||
@@ -393,6 +393,7 @@ HWTEST_F(ModuleWithZebinAndL0DebuggerTest, GivenDumpElfFlagAndZebinWhenInitializ
|
||||
std::string fileName = "dumped_debug_module.elf";
|
||||
EXPECT_FALSE(virtualFileExists(fileName));
|
||||
|
||||
VariableBackup<decltype(NEO::IoFunctions::fopenPtr)> mockFopenToNullAsNotNeededHere{&NEO::IoFunctions::fopenPtr, [](const char *filename, const char *mode) -> FILE * { return nullptr; }};
|
||||
EXPECT_EQ(moduleMock->initialize(&moduleDesc, neoDevice), ZE_RESULT_SUCCESS);
|
||||
EXPECT_TRUE(virtualFileExists(fileName));
|
||||
removeVirtualFile(fileName.c_str());
|
||||
|
||||
Reference in New Issue
Block a user