summaryrefslogtreecommitdiffstats
path: root/tests/auto/lancelot
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/lancelot')
-rw-r--r--tests/auto/lancelot/tst_lancelot.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp
index a06a251..8467672 100644
--- a/tests/auto/lancelot/tst_lancelot.cpp
+++ b/tests/auto/lancelot/tst_lancelot.cpp
@@ -72,6 +72,7 @@ private:
BaselineProtocol proto;
ImageItemList baseList;
QHash<QString, QStringList> scripts;
+ bool dryRunMode;
private slots:
void initTestCase();
@@ -103,13 +104,8 @@ void tst_Lancelot::initTestCase()
#if defined(Q_OS_SOMEPLATFORM)
QSKIP("This test is not supported on this platform.", SkipAll);
#endif
- if (!proto.connect()) {
- QTest::qSleep(3000); // Wait a bit and try again, the server might just be restarting
- if (!proto.connect()) {
- QWARN(qPrintable(proto.errorMessage()));
- QSKIP("Communication with baseline image server failed.", SkipAll);
- }
- }
+ if (!proto.connect(&dryRunMode))
+ QSKIP(qPrintable(proto.errorMessage()), SkipAll);
QDir qpsDir(scriptsDir);
QStringList files = qpsDir.entryList(QStringList() << QLatin1String("*.qps"), QDir::Files | QDir::Readable);
@@ -250,7 +246,10 @@ void tst_Lancelot::runTestSuite()
QByteArray serverMsg;
if (!proto.submitMismatch(rendered, &serverMsg))
serverMsg = "Failed to submit mismatching image to server.";
- QFAIL("Rendered image differs from baseline.\n" + serverMsg);
+ if (dryRunMode)
+ qDebug() << "Dryrun mode, ignoring detected mismatch." << serverMsg;
+ else
+ QFAIL("Rendered image differs from baseline.\n" + serverMsg);
}
}