RegressionTest: Fixes to regression testing system to make it run

correctly on Ubuntu 12.04 - fixed size of grabbed image. Side effect is
that the default window size for ResInsight is increased slightly.
Removed parameter to image comparison tool to allow running regression
tests on RedHat 5
This commit is contained in:
Magne Sjaastad
2013-10-04 10:22:17 +02:00
parent 483b1a0fd9
commit cf439fbf96
6 changed files with 56 additions and 9 deletions

View File

@@ -1401,6 +1401,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
}
m_commandQueueLock.unlock();
regressionTestSetFixedSizeForAllViews();
saveSnapshotForAllViews(generatedFolderName);
QDir baseDir(testCaseFolder.filePath(baseFolderName));
@@ -1776,7 +1778,8 @@ void RiaApplication::executeRegressionTests(const QString& regressionTestPath)
if (mainWnd)
{
mainWnd->hideAllDockWindows();
mainWnd->setDefaultWindowSize();
runRegressionTest(regressionTestPath);
mainWnd->loadWinGeoAndDockToolBarLayout();
@@ -1784,3 +1787,34 @@ void RiaApplication::executeRegressionTests(const QString& regressionTestPath)
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::regressionTestSetFixedSizeForAllViews()
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (!mainWnd) return;
if (m_project.isNull()) return;
std::vector<RimCase*> projectCases;
m_project->allCases(projectCases);
for (size_t i = 0; i < projectCases.size(); i++)
{
RimCase* ri = projectCases[i];
if (!ri) continue;
for (size_t j = 0; j < ri->reservoirViews().size(); j++)
{
RimReservoirView* riv = ri->reservoirViews()[j];
if (riv && riv->viewer())
{
// This size is set to match the regression test reference images
riv->viewer()->setFixedSize(1000, 745);
}
}
}
}