System : Output messages to std cout when running regression tests from command line

This commit is contained in:
Magne Sjaastad committed 2019-02-21 13:13:19 +01:00
1 parent a010fc03d7
commit 287ff64fc2
4 files changed
+137 -2

No files matched your search

@@ -22,6 +22,7 @@
#include "RiaBaseDefs.h"
#include "RiaEclipseFileNameTools.h"
#include "RiaImportEclipseCaseTools.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
#include "RiaProjectModifier.h"
#include "RiaRegressionTestRunner.h"
@@ -146,6 +147,15 @@ bool RiaArgumentParser::parseArguments()
{
CVF_ASSERT(o.valueCount() == 1);
QString regressionTestPath = cvfqt::Utils::toQString(o.value(0));
// Use a logger writing to stdout instead of message panel
// This is useful when executing regression tests on a build server, and this is the reason for creating the logger when
// parsing the command line options
auto stdLogger = new RiaStdOutLogger;
stdLogger->setLevel(RI_LL_DEBUG);
RiaLogging::setLoggerInstance(stdLogger);
RiaRegressionTestRunner::instance()->executeRegressionTests(regressionTestPath, QStringList());
return false;
}