Headless: handle unknown command arguments better

This commit is contained in:
Gaute Lindkvist
2019-05-06 13:35:05 +02:00
parent 911b69b56f
commit 07903a6324
4 changed files with 35 additions and 6 deletions
@@ -594,8 +594,15 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments(cvf::Progra
if (cvf::Option o = progOpt->option("unittest"))
{
int testReturnValue = launchUnitTestsWithConsole();
return testReturnValue == 0 ? RiaApplication::EXIT_COMPLETED : RiaApplication::EXIT_WITH_ERROR;
if (testReturnValue == 0)
{
return RiaApplication::EXIT_COMPLETED;
}
else
{
RiaLogging::error("Error running unit tests");
return RiaApplication::EXIT_WITH_ERROR;
}
}
if (cvf::Option o = progOpt->option("regressiontest"))