Various fixes and additions to logger system.
This commit is contained in:
parent
ac07ad67d9
commit
94c6ae4eab
9 changed files with 266 additions and 104 deletions
63
test/test-automation/plain_logger.c
Normal file
63
test/test-automation/plain_logger.c
Normal file
|
@ -0,0 +1,63 @@
|
|||
|
||||
#ifndef _PLAIN_LOGGER
|
||||
#define _PLAIN_LOGGER
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "plain_logger.h"
|
||||
|
||||
|
||||
LogOutputFp logger = 0;
|
||||
|
||||
void
|
||||
PlainRunStarted(LogOutputFp outputFn, const char *runnerParameters, time_t eventTime)
|
||||
{
|
||||
logger = outputFn;
|
||||
}
|
||||
|
||||
void
|
||||
PlainRunEnded(time_t endTime, time_t totalRuntime)
|
||||
{
|
||||
// \todo add total number of tests, suites, pass/failure test count
|
||||
}
|
||||
|
||||
void
|
||||
PlainSuiteStarted(const char *suiteName, time_t eventTime)
|
||||
{
|
||||
printf("Executing tests in %s\n", suiteName);
|
||||
}
|
||||
|
||||
void
|
||||
PlainSuiteEnded(int testsPassed, int testsFailed, int testsSkipped,
|
||||
double endTime, time_t totalRuntime)
|
||||
{
|
||||
printf("Suite executed. %d passed, %d failed and %d skipped\n", testsPassed, testsFailed, testsSkipped);
|
||||
}
|
||||
|
||||
void
|
||||
PlainTestStarted(const char *testName, const char *testDescription, time_t startTime)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
PlainTestEnded(const char *testName, const char *testDescription,
|
||||
int testResult, int numAsserts, time_t endTime, time_t totalRuntime)
|
||||
{
|
||||
printf("Asserts:%d\n", numAsserts);
|
||||
printf("%s: ok\n", testName);
|
||||
}
|
||||
|
||||
void
|
||||
PlainAssert(const char *assertName, int assertResult, const char *assertMessage,
|
||||
time_t eventTime)
|
||||
{
|
||||
const char *result = (assertResult) ? "passed" : "failed";
|
||||
printf("%s %s: %s\n", assertName, assertResult, assertMessage);
|
||||
}
|
||||
|
||||
void
|
||||
PlainLog(const char *logMessage, time_t eventTime)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue