mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
refactor: use virtualFileSystem in ULTs
reducing the number of tests that have interactions with filesystem. writeDataToFile() saves filename and content in std::map. fileExistsHasSize() checks if file was previously written to virtualFileSystem loadDataFromVirtualFile() fetches data from std::map based on filename Related-To: NEO-7006 Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9f23867d30
commit
e27a6dc280
@@ -25,7 +25,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) {
|
||||
FullyEnabledFileLogger fileLogger(testFile, flags);
|
||||
|
||||
// Log file not created
|
||||
bool logFileCreated = fileExists(fileLogger.getLogFileName());
|
||||
bool logFileCreated = virtualFileExists(fileLogger.getLogFileName());
|
||||
EXPECT_FALSE(logFileCreated);
|
||||
auto executionEnvironment = std::unique_ptr<ExecutionEnvironment>(MockDevice::prepareExecutionEnvironment(defaultHwInfo.get(), 0u));
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
@@ -82,7 +82,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagSetFalseThenAllocationIs
|
||||
FullyEnabledFileLogger fileLogger(testFile, flags);
|
||||
|
||||
// Log file not created
|
||||
bool logFileCreated = fileExists(fileLogger.getLogFileName());
|
||||
bool logFileCreated = virtualFileExists(fileLogger.getLogFileName());
|
||||
EXPECT_FALSE(logFileCreated);
|
||||
|
||||
auto executionEnvironment = std::unique_ptr<ExecutionEnvironment>(MockDevice::prepareExecutionEnvironment(defaultHwInfo.get(), 0u));
|
||||
|
||||
Reference in New Issue
Block a user