mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user