mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2554 Regression Test : Reorganize setting of current working folder
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaRegressionTest.h"
|
||||
#include "RiaSocketServer.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
#include "RiaViewRedrawScheduler.h"
|
||||
@@ -1994,6 +1995,18 @@ void RiaApplication::runRegressionTest(const QString& testRootPath, QStringList*
|
||||
{
|
||||
m_runningRegressionTests = true;
|
||||
|
||||
RiaRegressionTest regressionTestConfig;
|
||||
regressionTestConfig.readSettingsFromApplicationStore();
|
||||
|
||||
QString currentApplicationPath = QDir::currentPath();
|
||||
if (!regressionTestConfig.folderContainingCompareTool().isEmpty())
|
||||
{
|
||||
// Windows Only : The image compare tool requires current working directory to be at the folder
|
||||
// containing the image compare tool
|
||||
|
||||
QDir::setCurrent(regressionTestConfig.folderContainingCompareTool());
|
||||
}
|
||||
|
||||
QString generatedFolderName = RegTestNames::generatedFolderName;
|
||||
QString diffFolderName = RegTestNames::diffFolderName;
|
||||
QString baseFolderName = RegTestNames::baseFolderName;
|
||||
@@ -2189,6 +2202,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath, QStringList*
|
||||
RiaLogging::info("\n");
|
||||
logInfoTextWithTimeInSeconds(timeStamp, "Completed regression tests");
|
||||
|
||||
QDir::setCurrent(currentApplicationPath);
|
||||
|
||||
m_runningRegressionTests = false;
|
||||
}
|
||||
|
||||
@@ -2449,6 +2464,20 @@ void RiaApplication::executeRegressionTests(const QString& regressionTestPath, Q
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::executeRegressionTests()
|
||||
{
|
||||
RiaRegressionTest testConfig;
|
||||
testConfig.readSettingsFromApplicationStore();
|
||||
|
||||
QString testPath = testConfig.regressionTestFolder();
|
||||
QStringList testFilter = testConfig.testFilter().split(";", QString::SkipEmptyParts);
|
||||
|
||||
executeRegressionTests(testPath, &testFilter);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user