aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-11-12 15:49:39 -0800
committerJake Petroules <jake.petroules@qt.io>2017-11-13 09:56:11 +0000
commit056ef501aee7e251cde2dbcf07563f2f1c18c9aa (patch)
tree47a5e4ffe673eab60d8ca1345343351cdfc155a3
parente051d18c09edb4bff96a80d7068d46a7391ff26a (diff)
Make the teapot test a little less strict
Make 'unexpected files encountered' only a warning instead of an error; it's possible and has historical precedent in the Android samples. Further, remove th ic_launcher.png files from the list of required files of the teapot example. These became mipmaps instead of drawables at some point and it is not worth the effort to try to create a proper conditional to select the right list of files. Change-Id: If71bc394e64c19448c152b905ecff29dd436d190 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--tests/auto/blackbox/tst_blackboxandroid.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp
index 599b4358b..9e1b30c57 100644
--- a/tests/auto/blackbox/tst_blackboxandroid.cpp
+++ b/tests/auto/blackbox/tst_blackboxandroid.cpp
@@ -124,8 +124,17 @@ void TestBlackboxAndroid::android()
}
if (!missingExpectedFiles.isEmpty())
QFAIL(QByteArray("missing expected files:\n") + missingExpectedFiles.join('\n'));
- if (!actualFiles.isEmpty())
- QFAIL(QByteArray("unexpected files encountered:\n") + actualFiles.join('\n'));
+ if (!actualFiles.isEmpty()) {
+ QByteArray msg = "unexpected files encountered:\n" + actualFiles.join('\n');
+ auto it = std::find_if(std::begin(actualFiles), std::end(actualFiles),
+ [](const QByteArray &f) {
+ return f.endsWith(".so");
+ });
+ if (it == std::end(actualFiles))
+ QWARN(msg);
+ else
+ QFAIL(msg);
+ }
}
if (projectDir == "multiple-libs-per-apk") {
@@ -191,10 +200,6 @@ void TestBlackboxAndroid::android_data()
"lib/${ARCH}/gdbserver",
"lib/${ARCH}/libgnustl_shared.so",
"lib/${ARCH}/libTeapotNativeActivity.so",
- "res/drawable-hdpi-v4/ic_launcher.png",
- "res/drawable-ldpi-v4/ic_launcher.png",
- "res/drawable-mdpi-v4/ic_launcher.png",
- "res/drawable-xhdpi-v4/ic_launcher.png",
"res/layout/widgets.xml"}));
QTest::newRow("no native")
<< "no-native"