Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93583

BT unit tests on Android fail to request permission

    XMLWordPrintable

Details

    • Android
    • ded6f0ad105897a2b6ba5810318638078ec70705

    Description

      When starting the BluetoothTestDevice
      https://codereview.qt-project.org/c/qt/qtconnectivity/+/347091/7
      on my PC and running the unit test created in
      https://codereview.qt-project.org/c/qt/qtconnectivity/+/347342/4
      on my Android 10 phone (Sony XPeria XZ2 Compact)
      using
      "ninja tst_qlowenergycontroller_device_check"
      I just get the following output. I think the "Found no valid pending permission request for request code 0" is the core problem.

      [1/1] Running /usr/bin/ctest -V -R "^tst_qlowenergycontroller_device$"
      UpdateCTestConfiguration  from :/home/andreasbuhr/development/qtdev/androidbuild/qtconnectivity-android/tests/manual/qlowenergycontroller/DartConfiguration.tcl
      UpdateCTestConfiguration  from :/home/andreasbuhr/development/qtdev/androidbuild/qtconnectivity-android/tests/manual/qlowenergycontroller/DartConfiguration.tcl
      Test project /home/andreasbuhr/development/qtdev/androidbuild/qtconnectivity-android/tests/manual/qlowenergycontroller
      Constructing a list of tests
      Done constructing a list of tests
      Updating test list for fixtures
      Added 0 tests to meet fixture requirements
      Checking test dependency graph...
      Checking test dependency graph end
      test 1
          Start 1: tst_qlowenergycontroller_device
      
      1: Test command: /usr/bin/cmake "-P" "/home/andreasbuhr/development/qtdev/androidbuild/qtconnectivity-android/tests/manual/qlowenergycontroller/tst_qlowenergycontroller_deviceWrapperDebug.cmake"
      1: Test timeout computed to be: 10000000
      1: Execute /home/andreasbuhr/Android/Sdk/platform-tools/adb install -r /home/andreasbuhr/development/qtdev/androidbuild/qtconnectivity-android/tests/manual/qlowenergycontroller/android-build/tst_qlowenergycontroller_device.apk.
      1: Performing Streamed Install
      1: Success
      1: Execute /home/andreasbuhr/Android/Sdk/platform-tools/adb shell am start -e applicationArguments \"'-o output.txt,txt'\" -n org.qtproject.example.tst_qlowenergycontroller_device/org.qtproject.qt.android.bindings.QtActivity.
      1: Starting: Intent { cmp=org.qtproject.example.tst_qlowenergycontroller_device/org.qtproject.qt.android.bindings.QtActivity (has extras) }
      1: ********* Start testing of tst_qlowenergycontroller_device *********
      1: Config: Using QtTest library 6.2.0, Qt 6.2.0 (arm-little_endian-ilp32-eabi shared (dynamic) debug build; by Clang 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f)), android 10.0
      1: QWARN  : tst_qlowenergycontroller_device::initTestCase() qt.bluetooth.android: Requesting ACCESS_*_LOCATION permission
      1: QWARN  : tst_qlowenergycontroller_device::initTestCase() Found no valid pending permission request for request code 0
      1: Execute /home/andreasbuhr/Android/Sdk/platform-tools/adb uninstall org.qtproject.example.tst_qlowenergycontroller_device.
      1: Success
      1/1 Test #1: tst_qlowenergycontroller_device ...   Passed   56.32 sec
      
      The following tests passed:
      	tst_qlowenergycontroller_device
      
      100% tests passed, 0 tests failed out of 1
      
      Label Time Summary:
      tests/manual/qlowenergycontroller/tst_qlowenergycontroller_device    =  56.32 sec*proc (1 test)
      
      Total Test time (real) =  56.32 sec
      
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ablasche Alex Blasche
              andreasbuhr Andreas Buhr
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes