summaryrefslogtreecommitdiffstats
path: root/tests/auto/lancelot
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-04-07 15:02:02 +0200
committeraavit <qt-info@nokia.com>2011-04-07 15:02:02 +0200
commitfcef03057616a872dc07941f08bbcd26da962cc2 (patch)
tree02f0563f055fb1dcd21ded0ee39bb56416cb0e23 /tests/auto/lancelot
parent23b01158402cfed78959ba30217ce33172ff12ab (diff)
Lancelot: bail out if rendering consistently fails
Diffstat (limited to 'tests/auto/lancelot')
-rw-r--r--tests/auto/lancelot/tst_lancelot.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp
index e515c4884d..972166514a 100644
--- a/tests/auto/lancelot/tst_lancelot.cpp
+++ b/tests/auto/lancelot/tst_lancelot.cpp
@@ -239,11 +239,20 @@ void tst_Lancelot::runTestSuite(GraphicsEngine engine, QImage::Format format)
QSKIP("Blacklisted by baseline server.", SkipSingle);
ImageItem rendered = render(baseline, engine, format);
+ static int consecutiveErrs = 0;
if (rendered.image.isNull()) { // Assume an error in the test environment, not Qt
QWARN("Error: Failed to render image.");
- QSKIP("Aborted due to errors.", SkipSingle);
+ if (++consecutiveErrs < 3) {
+ QSKIP("Aborted due to errors.", SkipSingle);
+ } else {
+ consecutiveErrs = 0;
+ QSKIP("Too many errors, skipping rest of testfunction.", SkipAll);
+ }
+ } else {
+ consecutiveErrs = 0;
}
+
if (baseline.status == ImageItem::BaselineNotFound) {
proto.submitNewBaseline(rendered, 0);
QSKIP("Baseline not found; new baseline created.", SkipSingle);