aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-06-12 09:43:10 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2021-06-14 17:42:21 +0000
commitfb3b51013323d76c301a36c20fb4b53cc93fb45b (patch)
tree93d86c964b45d28e6970f9e2d4c4a9aa120ab8ac /tests/auto
parenta9b5f3ad3175830925f67f723ff04a8f2a954011 (diff)
codesign: Fix checking if product is a framework
It is not correct to check for the frameworkVersion to determine if product is a Framework - e.g. Xcode always sets this variable. Instead, product.type or product.bundle.packageType should be checked instead. This fixes the problem when codesign incorrectly determines bundle as a framework if product.version is set. Fixes: QBS-1649 Change-Id: I067e852df82a43897000d45e27908dd5e22eac70 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/blackbox/testdata-apple/codesign/codesign.qbs3
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs b/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
index eafb0be84..08c8f730b 100644
--- a/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
+++ b/tests/auto/blackbox/testdata-apple/codesign/codesign.qbs
@@ -9,6 +9,7 @@ Project {
CppApplication {
name: "A"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
@@ -23,6 +24,7 @@ Project {
DynamicLibrary {
Depends { name: "cpp" }
name: "B"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
@@ -36,6 +38,7 @@ Project {
LoadableModule {
Depends { name: "cpp" }
name: "C"
+ version: "1.0.0"
bundle.isBundle: project.isBundle
files: "app.cpp"
codesign.enableCodeSigning: project.enableSigning
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp
index 8c9792211..f8645bac6 100644
--- a/tests/auto/blackbox/tst_blackboxapple.cpp
+++ b/tests/auto/blackbox/tst_blackboxapple.cpp
@@ -751,7 +751,8 @@ void TestBlackboxApple::codesign()
QCOMPARE(codeSignInfo.second.value(QByteArrayLiteral("Signature")), "adhoc");
}
- const auto libName = isBundle ? QStringLiteral("B.framework") : QStringLiteral("libB.dylib");
+ const auto libName =
+ isBundle ? QStringLiteral("B.framework") : QStringLiteral("libB.1.0.0.dylib");
const auto libPath = defaultInstallRoot + "/" + libName;
QVERIFY(QFileInfo(libPath).exists());
codeSignInfo = getCodeSignInfo(libPath);