mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System: Do not change the preferences when running regression tests.
We need the flexibility in the tests.
This commit is contained in:
parent
2f05ecb9ad
commit
d84db62ebb
@ -1771,21 +1771,6 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
|
||||
// Open HTML report
|
||||
QDesktopServices::openUrl(htmlReportFileName);
|
||||
|
||||
// Keep current preferences values to be able to restore when regression tests are completed
|
||||
std::vector<QVariant> preferencesValues;
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
this->preferences()->fields(fields);
|
||||
for (size_t i = 0; i < fields.size(); i++)
|
||||
{
|
||||
QVariant v = fields[i]->uiCapability()->uiValue();
|
||||
preferencesValues.push_back(v);
|
||||
}
|
||||
}
|
||||
|
||||
// Set preferences to make sure regression tests behave identical
|
||||
this->preferences()->configureForRegressionTests();
|
||||
|
||||
for (int dirIdx = 0; dirIdx < folderList.size(); ++dirIdx)
|
||||
{
|
||||
QDir testCaseFolder(folderList[dirIdx].filePath());
|
||||
@ -1825,18 +1810,6 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
|
||||
|
||||
closeProject(false);
|
||||
}
|
||||
|
||||
// Restore preferences
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
this->preferences()->fields(fields);
|
||||
CVF_ASSERT(fields.size() == preferencesValues.size());
|
||||
|
||||
for (size_t i = 0; i < preferencesValues.size(); i++)
|
||||
{
|
||||
fields[i]->uiCapability()->setValueFromUi(preferencesValues[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_runningRegressionTests = false;
|
||||
|
Loading…
Reference in New Issue
Block a user