From 4680317cac5d7af65e25b02e7b4a799073ea9e4f Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Fri, 31 Mar 2023 14:33:43 +0300 Subject: Link applicable manual tests against permission plugin on macOS As a temporary workaround (see QTBUG-112212) Task-number: QTBUG-112215 Task-number: QTBUG-112212 Change-Id: Iae6f94e4d208e829993a0af136d21522ca819eb1 Reviewed-by: Ivan Solovev Reviewed-by: Qt CI Bot --- tests/manual/qlowenergycontroller/CMakeLists.txt | 7 +++++++ tests/manual/qlowenergycontroller_peripheral/CMakeLists.txt | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/manual/qlowenergycontroller/CMakeLists.txt b/tests/manual/qlowenergycontroller/CMakeLists.txt index 82a0d40c..a1039a5b 100644 --- a/tests/manual/qlowenergycontroller/CMakeLists.txt +++ b/tests/manual/qlowenergycontroller/CMakeLists.txt @@ -39,6 +39,13 @@ qt_internal_extend_target(tst_qlowenergycontroller_device QT_ANDROID_BLUETOOTH ) +if(MACOS) + # Explicitly link against the static permission plugin because tests + # currently don't have finalizers run for them except for iOS. + # TODO: Remove this when qtbase automatically runs finalizers for tests: QTBUG-112212 + target_link_libraries(tst_qlowenergycontroller_device PRIVATE Qt6::QDarwinBluetoothPermissionPlugin) +endif() + endif() set_target_properties(tst_qlowenergycontroller_device PROPERTIES diff --git a/tests/manual/qlowenergycontroller_peripheral/CMakeLists.txt b/tests/manual/qlowenergycontroller_peripheral/CMakeLists.txt index abd84bb8..377e2dd3 100644 --- a/tests/manual/qlowenergycontroller_peripheral/CMakeLists.txt +++ b/tests/manual/qlowenergycontroller_peripheral/CMakeLists.txt @@ -37,6 +37,14 @@ else() QT_ANDROID_BLUETOOTH ) + if(MACOS) + # Explicitly link against the static permission plugin because tests + # currently don't have finalizers run for them except for iOS. + # TODO: Remove this when qtbase automatically runs finalizers for tests: QTBUG-112212 + target_link_libraries(tst_qlowenergycontroller_peripheral + PRIVATE Qt6::QDarwinBluetoothPermissionPlugin) + endif() + endif() set_target_properties(tst_qlowenergycontroller_peripheral PROPERTIES -- cgit v1.2.1