summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-11-29 22:33:12 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-06 16:52:48 +0000
commit82d6ea4a8503d85a87e38c760db0cccce4687e7a (patch)
treec472a7e52b15d84b1b68c5e2bd9552cabe93c85c
parentec48db23ae87a89eb3c5a59979186828303c845b (diff)
downloadqtconnectivity-82d6ea4a8503d85a87e38c760db0cccce4687e7a.tar.gz
Add Info.plists to BT LE test components on macOS and iOS
Make it possible to run the BT LE test on macOS/iOS. "bluetoothtestdevice" is a BT LE server and "tst_qlowenergycontroller_device" is a BT LE client counterpart. Task-number: QTBUG-98781 Change-Id: Id5deb184398c9ea4e5b84555f33c9beb0c2459c0 Reviewed-by: Tamas Martinec <tamas.martinec@symbio.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit d2619dec4e46da355177f65e04f722af5287380c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/bluetoothtestdevice/CMakeLists.txt16
-rw-r--r--tests/bluetoothtestdevice/Info.ios.plist35
-rw-r--r--tests/bluetoothtestdevice/Info.macos.plist24
-rw-r--r--tests/manual/qlowenergycontroller/CMakeLists.txt16
-rw-r--r--tests/manual/qlowenergycontroller/Info.ios.plist35
-rw-r--r--tests/manual/qlowenergycontroller/Info.macos.plist24
6 files changed, 148 insertions, 2 deletions
diff --git a/tests/bluetoothtestdevice/CMakeLists.txt b/tests/bluetoothtestdevice/CMakeLists.txt
index ff9edead..7e9281e8 100644
--- a/tests/bluetoothtestdevice/CMakeLists.txt
+++ b/tests/bluetoothtestdevice/CMakeLists.txt
@@ -29,10 +29,22 @@ else()
endif()
set_target_properties(bluetoothtestdevice PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
)
+if(APPLE)
+ if(IOS)
+ set_target_properties(bluetoothtestdevice PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.ios.plist"
+ )
+ else()
+ set_target_properties(bluetoothtestdevice PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.macos.plist"
+ )
+ endif()
+endif()
+
target_link_libraries(
bluetoothtestdevice
PUBLIC
diff --git a/tests/bluetoothtestdevice/Info.ios.plist b/tests/bluetoothtestdevice/Info.ios.plist
new file mode 100644
index 00000000..8dc7f08e
--- /dev/null
+++ b/tests/bluetoothtestdevice/Info.ios.plist
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDisplayName</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSBluetoothAlwaysUsageDescription</key>
+ <string>BT test component wants to access your bluetooth adapter</string>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/tests/bluetoothtestdevice/Info.macos.plist b/tests/bluetoothtestdevice/Info.macos.plist
new file mode 100644
index 00000000..7c18450d
--- /dev/null
+++ b/tests/bluetoothtestdevice/Info.macos.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>NSBluetoothAlwaysUsageDescription</key>
+ <string>BT test component wants to access your bluetooth adapter</string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>
diff --git a/tests/manual/qlowenergycontroller/CMakeLists.txt b/tests/manual/qlowenergycontroller/CMakeLists.txt
index b434d8a2..0a2a89da 100644
--- a/tests/manual/qlowenergycontroller/CMakeLists.txt
+++ b/tests/manual/qlowenergycontroller/CMakeLists.txt
@@ -11,3 +11,19 @@ qt_internal_extend_target(tst_qlowenergycontroller_device
QT_ANDROID_BLUETOOTH
)
+set_target_properties(tst_qlowenergycontroller_device PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+
+if(APPLE)
+ if(IOS)
+ set_target_properties(tst_qlowenergycontroller_device PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.ios.plist"
+ )
+ else()
+ set_target_properties(tst_qlowenergycontroller_device PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.macos.plist"
+ )
+ endif()
+endif()
diff --git a/tests/manual/qlowenergycontroller/Info.ios.plist b/tests/manual/qlowenergycontroller/Info.ios.plist
new file mode 100644
index 00000000..8dc7f08e
--- /dev/null
+++ b/tests/manual/qlowenergycontroller/Info.ios.plist
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDisplayName</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSBluetoothAlwaysUsageDescription</key>
+ <string>BT test component wants to access your bluetooth adapter</string>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/tests/manual/qlowenergycontroller/Info.macos.plist b/tests/manual/qlowenergycontroller/Info.macos.plist
new file mode 100644
index 00000000..7c18450d
--- /dev/null
+++ b/tests/manual/qlowenergycontroller/Info.macos.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>NSBluetoothAlwaysUsageDescription</key>
+ <string>BT test component wants to access your bluetooth adapter</string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>