mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 14:42:28 +01:00
fix(simulation): a test's standard output carries its result only
The log was printed in colour to stdout too (debuglog bit 2), so a script reading the verdict of a test got the whole log with it. In test mode the log goes to the log file only and stdout has the `test: ...` line alone; the usage text of a bad command line goes to stderr. Whether the run is a test is now known before the log service starts.
This commit is contained in:
@@ -125,8 +125,8 @@ void LogService()
|
||||
if (log_scrollback.size() > 200)
|
||||
log_scrollback.pop_front();
|
||||
|
||||
// log to console
|
||||
if (Global.iWriteLogEnabled & 2)
|
||||
// log to console; not in test mode, where the standard output carries the result of the test only
|
||||
if ((Global.iWriteLogEnabled & 2) && false == Global.test.enabled)
|
||||
{
|
||||
if (isError)
|
||||
printf("\033[1;37;41m%s\033[0m\n", msg.c_str());
|
||||
|
||||
Reference in New Issue
Block a user