summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-10-26 12:53:36 +0100
committerIvan Komissarov <abbapoh@gmail.com>2020-10-26 12:53:36 +0100
commit6bceb1b73945e636087ca5afda431172b02ae0af (patch)
tree8250b53caad6b07692a980f54edfc29559caab75 /tests
parentf4d1c96b9aa73a5c215c7f76551df1ae4e7d9d54 (diff)
parent6668da028ba9a3854a2190191a899efc6bccb2f8 (diff)
downloadqbs-6bceb1b73945e636087ca5afda431172b02ae0af.tar.gz
Merge branch '1.17'
Change-Id: Ifcd65b201f060506d53dcffc0031d186a6dc227e
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/tst_blackboxandroid.cpp75
1 files changed, 35 insertions, 40 deletions
diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp
index 86c74cf08..f3d960ece 100644
--- a/tests/auto/blackbox/tst_blackboxandroid.cpp
+++ b/tests/auto/blackbox/tst_blackboxandroid.cpp
@@ -218,17 +218,15 @@ void TestBlackboxAndroid::android_data()
const QByteArray path = "lib/${ARCH}/";
return path + (usesClang ? "libc++_shared.so" : oldcxxLib);
};
- bool usingOldQt = true;
+ qbs::Version version(5, 13);
QStringList qmakeFilePaths = pQt.value(QStringLiteral("moduleProviders.Qt.qmakeFilePaths")).
toStringList();
- if (qmakeFilePaths.size() == 1) {
- qbs::Version version = TestBlackboxBase::qmakeVersion(qmakeFilePaths[0]);
- if (version.isValid() && version >= qbs::Version(5, 14))
- usingOldQt = false;
- }
+ if (qmakeFilePaths.size() == 1)
+ version = TestBlackboxBase::qmakeVersion(qmakeFilePaths[0]);
+ bool singleArchQt = (version < qbs::Version(5, 14));
QByteArrayList archsForQt;
- if (usingOldQt) {
+ if (singleArchQt) {
archsForQt = { pQt.value("qbs.architecture").toString().toUtf8() };
if (archsStringList.empty())
archsStringList << QStringLiteral("armv7a"); // must match default in common.qbs
@@ -298,7 +296,7 @@ void TestBlackboxAndroid::android_data()
auto qtAppExpectedFiles = [&](bool generateAab) {
QByteArrayList expectedFile;
- if (usingOldQt) {
+ if (singleArchQt) {
expectedFile << commonFiles(generateAab) + expandArchs(ndkArchsForQt, {
cxxLibPath("libgnustl_shared.so", true),
"assets/--Added-by-androiddeployqt--/qt_cache_pregenerated_file_list",
@@ -422,7 +420,7 @@ void TestBlackboxAndroid::android_data()
<< enableAapt2 << generateAab << isIncrementalBuild;
auto qmlAppExpectedFiles = [&](bool generateAab) {
QByteArrayList expectedFile;
- if (usingOldQt) {
+ if (singleArchQt) {
expectedFile << commonFiles(generateAab) + expandArchs(ndkArchsForQt, {
"assets/--Added-by-androiddeployqt--/qml/QtQuick.2/plugins.qmltypes",
"assets/--Added-by-androiddeployqt--/qml/QtQuick.2/qmldir",
@@ -491,11 +489,19 @@ void TestBlackboxAndroid::android_data()
"lib/${ARCH}/libQt5Gui_${ARCH}.so",
"lib/${ARCH}/libQt5Network_${ARCH}.so",
"lib/${ARCH}/libQt5Qml_${ARCH}.so",
- "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so",
"lib/${ARCH}/libQt5Quick_${ARCH}.so",
"lib/${ARCH}/libQt5QmlModels_${ARCH}.so",
"lib/${ARCH}/libQt5QmlWorkerScript_${ARCH}.so",
"lib/${ARCH}/libqmlapp_${ARCH}.so"}, generateAab);
+ if (version < qbs::Version(5, 15))
+ expectedFile << expandArchs(ndkArchsForQt, {
+ "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so"}, generateAab);
+ if (version >= qbs::Version(5, 15))
+ expectedFile << expandArchs(ndkArchsForQt, {
+ "lib/${ARCH}/libqml_QtQml_StateMachine_qtqmlstatemachine_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_WorkerScript.2_workerscriptplugin_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_Models.2_modelsplugin_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_qmlplugin_${ARCH}.so"}, generateAab);
}
if (generateAab)
expectedFile << "base/resources.pb" << "base/assets.pb" << "base/native.pb";
@@ -506,7 +512,7 @@ void TestBlackboxAndroid::android_data()
auto qmlAppMinistroExpectedFiles = [&](bool generateAab) {
QByteArrayList expectedFile;
- if (usingOldQt) {
+ if (singleArchQt) {
expectedFile << commonFiles(generateAab) + expandArchs(ndkArchsForQt, {
"assets/--Added-by-androiddeployqt--/qt_cache_pregenerated_file_list",
cxxLibPath("libgnustl_shared.so", true),
@@ -525,7 +531,7 @@ void TestBlackboxAndroid::android_data()
};
auto qmlAppCustomMetaDataExpectedFiles = [&](bool generateAab) {
QByteArrayList expectedFile;
- if (usingOldQt) {
+ if (singleArchQt) {
expectedFile << commonFiles(generateAab) + expandArchs(ndkArchsForQt, {
"assets/--Added-by-androiddeployqt--/qml/QtQuick.2/plugins.qmltypes",
"assets/--Added-by-androiddeployqt--/qml/QtQuick.2/qmldir",
@@ -596,11 +602,19 @@ void TestBlackboxAndroid::android_data()
"lib/${ARCH}/libQt5Gui_${ARCH}.so",
"lib/${ARCH}/libQt5Network_${ARCH}.so",
"lib/${ARCH}/libQt5Qml_${ARCH}.so",
- "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so",
"lib/${ARCH}/libQt5Quick_${ARCH}.so",
"lib/${ARCH}/libQt5QmlModels_${ARCH}.so",
"lib/${ARCH}/libQt5QmlWorkerScript_${ARCH}.so",
"lib/${ARCH}/libqmlapp_${ARCH}.so"}, generateAab);
+ if (version < qbs::Version(5, 15))
+ expectedFile << expandArchs(ndkArchsForQt, {
+ "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so"}, generateAab);
+ if (version >= qbs::Version(5, 15))
+ expectedFile << expandArchs(ndkArchsForQt, {
+ "lib/${ARCH}/libqml_QtQml_StateMachine_qtqmlstatemachine_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_WorkerScript.2_workerscriptplugin_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_Models.2_modelsplugin_${ARCH}.so",
+ "lib/${ARCH}/libqml_QtQml_qmlplugin_${ARCH}.so"}, generateAab);
}
if (generateAab)
expectedFile << "base/resources.pb" << "base/assets.pb" << "base/native.pb";
@@ -609,7 +623,7 @@ void TestBlackboxAndroid::android_data()
return expectedFile;
};
QStringList qmlAppCustomProperties;
- if (usingOldQt) {
+ if (singleArchQt) {
qmlAppCustomProperties = QStringList{"modules.Android.sdk.automaticSources:false",
"modules.qbs.architecture:" + archsForQt.first()};
} else {
@@ -705,30 +719,6 @@ void TestBlackboxAndroid::android_data()
isIncrementalBuild = false;
enableAapt2 = false;
generateAab = false;
- QTest::newRow("no native")
- << "no-native"
- << QStringList("com.example.android.basicmediadecoder")
- << (QList<QByteArrayList>() << commonFiles(generateAab) + expandArchs(archs, {
- "resources.arsc",
- "res/drawable-hdpi-v4/ic_action_play_disabled.png",
- "res/drawable-hdpi-v4/ic_action_play.png",
- "res/drawable-hdpi-v4/ic_launcher.png",
- "res/drawable-hdpi-v4/tile.9.png",
- "res/drawable-mdpi-v4/ic_action_play_disabled.png",
- "res/drawable-mdpi-v4/ic_action_play.png",
- "res/drawable-mdpi-v4/ic_launcher.png",
- "res/drawable/selector_play.xml",
- "res/drawable-xhdpi-v4/ic_action_play_disabled.png",
- "res/drawable-xhdpi-v4/ic_action_play.png",
- "res/drawable-xhdpi-v4/ic_launcher.png",
- "res/drawable-xxhdpi-v4/ic_launcher.png",
- "res/layout/sample_main.xml",
- "res/menu/action_menu.xml",
- "res/menu-v11/action_menu.xml",
- "res/raw/vid_bigbuckbunny.mp4"}, generateAab))
- << QStringList{aaptVersion(enableAapt2), packageType(generateAab)}
- << enableAapt2 << generateAab << isIncrementalBuild;
- enableAapt2 = true;
auto noNativeExpectedFiles = [&](bool generateAab) {
QByteArrayList expectedFile;
expectedFile << commonFiles(generateAab) + expandArchs(archs, {
@@ -746,8 +736,6 @@ void TestBlackboxAndroid::android_data()
"res/drawable-xxhdpi-v4/ic_launcher.png",
"res/layout/sample_main.xml",
"res/menu/action_menu.xml",
- // I have no idea why this file is generated with aapt and not with aapt2
- //"res/menu-v11/action_menu.xml",
"res/raw/vid_bigbuckbunny.mp4"}, generateAab);
if (generateAab)
expectedFile << "base/resources.pb";
@@ -755,6 +743,13 @@ void TestBlackboxAndroid::android_data()
expectedFile << "resources.arsc";
return expectedFile;
};
+ QTest::newRow("no native")
+ << "no-native"
+ << QStringList("com.example.android.basicmediadecoder")
+ << (QList<QByteArrayList>() << noNativeExpectedFiles(generateAab))
+ << QStringList{aaptVersion(enableAapt2), packageType(generateAab)}
+ << enableAapt2 << generateAab << isIncrementalBuild;
+ enableAapt2 = true;
QTest::newRow("no native aapt2")
<< "no-native"
<< QStringList("com.example.android.basicmediadecoder")