#5518 Regression : Make sure all project settings are wiped before next run

This commit is contained in:
Magne Sjaastad
2020-02-11 13:49:36 +01:00
parent f0509d080a
commit 5ced642ca2
3 changed files with 28 additions and 2 deletions

View File

@@ -168,6 +168,8 @@ void RiaRegressionTestRunner::runRegressionTest()
timeStamp.start();
logInfoTextWithTimeInSeconds( timeStamp, "Starting regression tests\n" );
RiaApplication* app = RiaApplication::instance();
for ( const QFileInfo& folderFileInfo : folderList )
{
QDir testCaseFolder( folderFileInfo.filePath() );
@@ -194,8 +196,6 @@ void RiaRegressionTestRunner::runRegressionTest()
{
logInfoTextWithTimeInSeconds( timeStamp, "Initializing test :" + testCaseFolder.absolutePath() );
RiaApplication* app = RiaApplication::instance();
app->loadProject( testCaseFolder.filePath( projectFileName ) );
// Wait until all command objects have completed
@@ -220,6 +220,9 @@ void RiaRegressionTestRunner::runRegressionTest()
}
}
// Do a complete reset of project settings to avoid transfer of settings to next regression test
app->resetProject();
QDir baseDir( testCaseFolder.filePath( baseFolderName ) );
QDir genDir( testCaseFolder.filePath( generatedFolderName ) );
QDir diffDir( testCaseFolder.filePath( diffFolderName ) );