Setting a flag in the application class while running regression tests

This commit is contained in:
Pål Hagen 2015-06-26 13:44:16 +02:00
parent 0af13d4e13
commit 91adc80f90
2 changed files with 20 additions and 3 deletions

View File

@ -174,6 +174,8 @@ RiaApplication::RiaApplication(int& argc, char** argv)
// instead of using the application font
m_standardFont = new cvf::FixedAtlasFont(cvf::FixedAtlasFont::STANDARD);
m_resViewUpdateTimer = NULL;
m_runningRegressionTests = false;
}
@ -1609,6 +1611,8 @@ void removeDirectoryWithContent(QDir dirToDelete )
//--------------------------------------------------------------------------------------------------
void RiaApplication::runRegressionTest(const QString& testRootPath)
{
m_runningRegressionTests = true;
QString generatedFolderName = RegTestNames::generatedFolderName;
QString diffFolderName = RegTestNames::diffFolderName;
QString baseFolderName = RegTestNames::baseFolderName;
@ -1730,6 +1734,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
}
}
}
m_runningRegressionTests = false;
}
//--------------------------------------------------------------------------------------------------
@ -2081,6 +2087,14 @@ void RiaApplication::executeCommandObjects()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaApplication::isRunningRegressionTests() const
{
return m_runningRegressionTests;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -152,6 +152,8 @@ public:
void addCommandObject(RimCommandObject* commandObject);
void executeCommandObjects();
bool isRunningRegressionTests() const;
private:
enum ProjectLoadAction
{
@ -196,8 +198,9 @@ private:
QMap<QString, QVariant> m_sessionCache; // Session cache used to store username/passwords per session
std::list<RimCommandObject*> m_commandQueue;
QMutex m_commandQueueLock;
std::list<RimCommandObject*> m_commandQueue;
QMutex m_commandQueueLock;
QString m_helpText;
QString m_helpText;
bool m_runningRegressionTests;
};