summaryrefslogtreecommitdiffstats
path: root/tests/auto/lancelot
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-11-19 13:22:02 +0100
committeraavit <qt-info@nokia.com>2010-11-19 13:22:02 +0100
commite614223831f2b3cc9051ae88586370a7d5b63db2 (patch)
tree09378bec6bcf791191ba2ee243bf27ff26fafed5 /tests/auto/lancelot
parenteedfeabfba1bbbc26792966238463ca3d22665a9 (diff)
Added clean abort, dryrun mode. And stop ignoring the unused byte in RGB32
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 a06a25168c..8467672195 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);
}
}