mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
feature: Allow redirecting debugger logs to log file
- enhacement for logging debug messages to file Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c52f966fdf
commit
734a9fb952
@@ -395,6 +395,24 @@ TEST(FileLogger, whenFullyEnabledThenAllDebugFunctionalityIsAvailableAtCompileTi
|
||||
static_assert(true == fileLogger.enabled(), "");
|
||||
}
|
||||
|
||||
TEST(FileLogger, givenEnabledLogWhenLogDebugStringCalledThenStringIsWrittenToFile) {
|
||||
std::string testFile = "testfile";
|
||||
DebugVariables flags;
|
||||
FullyEnabledFileLogger fileLogger(testFile, flags);
|
||||
|
||||
fileLogger.logDebugString(true, "test log");
|
||||
EXPECT_EQ(std::string("test log"), fileLogger.getFileString(testFile));
|
||||
}
|
||||
|
||||
TEST(FileLogger, givenDisabledLogWhenLogDebugStringCalledThenStringIsNotWrittenToFile) {
|
||||
std::string testFile = "testfile";
|
||||
DebugVariables flags;
|
||||
FullyEnabledFileLogger fileLogger(testFile, flags);
|
||||
|
||||
fileLogger.logDebugString(false, "test log");
|
||||
EXPECT_EQ(0u, fileLogger.getFileString(testFile).size());
|
||||
}
|
||||
|
||||
TEST(AllocationTypeLogging, givenGraphicsAllocationTypeWhenConvertingToStringThenCorrectStringIsReturned) {
|
||||
std::string testFile = "testfile";
|
||||
DebugVariables flags;
|
||||
|
||||
Reference in New Issue
Block a user