summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-05-01 21:10:11 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2021-05-03 11:38:03 +0000
commit86eb6974126b4fdf4cfa3340b7a80833479f2d37 (patch)
tree020b0924b4f6fdcf7522a8c98c9b47322e3ee1f7 /tests
parent7111630416211363b8cc56f179bfa7ba4f271817 (diff)
downloadqbs-86eb6974126b4fdf4cfa3340b7a80833479f2d37.tar.gz
Fix reading Xcode 12.5 specsv1.19.0
Since Xcode 12.5, common specs for darwin platforms were moved to "Darwin Package/Product Types.xcspec" in the different folder. However, the old configs are still present, so we need to merge info from both variants. Also, allow to use undefined variables in .xcspec files - since 12.5, this is a valid use-case. Also, implement the "default=" variable formatter used as a fallback when variable is not set. Fixes: QBS-1644 Change-Id: I9a55c5d511cbb01f30219478ee9f3b85763a08d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata-apple/bundle-structure/bundle-structure.qbs3
-rw-r--r--tests/auto/blackbox/testdata-apple/infoPlistVariables/Info.plist2
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.cpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-apple/bundle-structure/bundle-structure.qbs b/tests/auto/blackbox/testdata-apple/bundle-structure/bundle-structure.qbs
index db5f15b18..705f054a8 100644
--- a/tests/auto/blackbox/testdata-apple/bundle-structure/bundle-structure.qbs
+++ b/tests/auto/blackbox/testdata-apple/bundle-structure/bundle-structure.qbs
@@ -134,6 +134,9 @@ Project {
name: "G"
bundle.isBundle: true
bundle.resources: ["resource.txt"]
+ // XCode 12.5 does not support com.apple.product-type.in-app-purchase-content type anymore,
+ // so use older specs from Qbs
+ bundle._useXcodeBuildSpecs: false
Group {
fileTagsFilter: product.type.concat(project.bundleFileTags)
qbs.install: true
diff --git a/tests/auto/blackbox/testdata-apple/infoPlistVariables/Info.plist b/tests/auto/blackbox/testdata-apple/infoPlistVariables/Info.plist
index b357378ac..cb879d70c 100644
--- a/tests/auto/blackbox/testdata-apple/infoPlistVariables/Info.plist
+++ b/tests/auto/blackbox/testdata-apple/infoPlistVariables/Info.plist
@@ -18,5 +18,7 @@
<string>${${EXE}_NAME}</string>
<key>BracesNested</key>
<string>${${EXE}_NAME}</string>
+ <key>WithDefault</key>
+ <string>${NON_EXISTING:default=DEFAULT}</string>
</dict>
</plist>
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp
index 884d2c077..8c9792211 100644
--- a/tests/auto/blackbox/tst_blackboxapple.cpp
+++ b/tests/auto/blackbox/tst_blackboxapple.cpp
@@ -1069,6 +1069,8 @@ void TestBlackboxApple::infoPlistVariables()
QStringLiteral("infoPlistVariables"));
QCOMPARE(content.value(QStringLiteral("BracesNested")),
QStringLiteral("infoPlistVariables"));
+ QCOMPARE(content.value(QStringLiteral("WithDefault")),
+ QStringLiteral("DEFAULT"));
}
void TestBlackboxApple::objcArc()