diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2021-06-12 09:43:10 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2021-06-14 17:42:21 +0000 |
commit | fb3b51013323d76c301a36c20fb4b53cc93fb45b (patch) | |
tree | 93d86c964b45d28e6970f9e2d4c4a9aa120ab8ac /tests | |
parent | a9b5f3ad3175830925f67f723ff04a8f2a954011 (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')
-rw-r--r-- | tests/auto/blackbox/testdata-apple/codesign/codesign.qbs | 3 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackboxapple.cpp | 3 |
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); |