From a3924b9846f8f3412e6cfc3704f69488e64da98e Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Sat, 22 Jan 2022 09:58:34 +0100 Subject: [PATCH] Skip tests that fail on platforms that don't implement grabWindow Replace QEXPECT_FAIL with QSKIP so that we can fix the offscreen plugin, and then re-enable tests that pass without having to orchestrate with the dependency updates. Pick-to: 6.3 Change-Id: Ifdf7fe85a5005f30d2edcba958ff0e9c6c9000b2 Reviewed-by: Fabian Kosmale --- tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp | 2 +- tests/auto/quick/qquicktext/tst_qquicktext.cpp | 2 +- tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp | 2 +- .../qquickninepatchimage/tst_qquickninepatchimage.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp index 54935e5fda..e28bfffe6f 100644 --- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp +++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp @@ -74,7 +74,7 @@ void tst_qquickrectangle::color() if ((QGuiApplication::platformName() == QLatin1String("offscreen")) || (QGuiApplication::platformName() == QLatin1String("minimal"))) - QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort); + QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms"); QImage image = view.grabWindow(); QVERIFY(image.pixel(0,0) == QColor("#020202").rgba()); diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 7acfcd697f..a1b627b9a9 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -1056,7 +1056,7 @@ void tst_qquicktext::hAlignImplicitWidth() { if ((QGuiApplication::platformName() == QLatin1String("offscreen")) || (QGuiApplication::platformName() == QLatin1String("minimal"))) - QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort); + QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms"); // Left Align QImage image = view.grabWindow(); diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index adadbd00f8..0fc3db86ae 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -947,7 +947,7 @@ void tst_qquicktextedit::hAlignVisual() { if ((QGuiApplication::platformName() == QLatin1String("offscreen")) || (QGuiApplication::platformName() == QLatin1String("minimal"))) - QEXPECT_FAIL("", "Failure due to grabWindow not functional on offscreen/minimal platforms", Abort); + QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms"); // Left Align QImage image = view.grabWindow(); diff --git a/tests/auto/quickcontrols2/qquickninepatchimage/tst_qquickninepatchimage.cpp b/tests/auto/quickcontrols2/qquickninepatchimage/tst_qquickninepatchimage.cpp index 0578248379..7918213040 100644 --- a/tests/auto/quickcontrols2/qquickninepatchimage/tst_qquickninepatchimage.cpp +++ b/tests/auto/quickcontrols2/qquickninepatchimage/tst_qquickninepatchimage.cpp @@ -133,7 +133,7 @@ void tst_qquickninepatchimage::ninePatch() if ((QGuiApplication::platformName() == QLatin1String("offscreen")) || (QGuiApplication::platformName() == QLatin1String("minimal"))) - QEXPECT_FAIL("", "Grabbing does not work on offscreen/minimal platforms", Abort); + QSKIP("Skipping due to grabWindow not functional on offscreen/minimal platforms"); QCOMPARE(ninePatchImageGrab, generatedImage); }