summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-04-07 13:02:02 (GMT)
committeraavit <qt-info@nokia.com>2011-04-07 13:02:02 (GMT)
commitfcef03057616a872dc07941f08bbcd26da962cc2 (patch)
tree02f0563f055fb1dcd21ded0ee39bb56416cb0e23 /tests
parent23b01158402cfed78959ba30217ce33172ff12ab (diff)
downloadQt-fcef03057616a872dc07941f08bbcd26da962cc2.zip
Qt-fcef03057616a872dc07941f08bbcd26da962cc2.tar.gz
Qt-fcef03057616a872dc07941f08bbcd26da962cc2.tar.bz2
Lancelot: bail out if rendering consistently fails
Diffstat (limited to 'tests')
-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 e515c48..9721665 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);