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

Android test failing because missing QT=gui ?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.5.0
    • 5.15.12
    • Core: Other
    • None
    • d53ea82950e0662b8265642b840a12d9f9556888

    Description

      When trying to build the APK for the tests in

      qtbase/tests/auto/other/android
      

      it fails with:

      No platform plugin, neither libqtforandroid.so or libqtforandroidGL.so, included in package. Please include one.
      

      To reproduce:

      configure with

       /usr/lib/qt-android-5.15/bin/qmake /mnt/packages/git_repos/dpkg/qt-android/qtbase/tests/auto/other/android/android.pro
      

      Build with

      make apk
      

      Workaround I found:

      Apply this patch

      --- a/qtbase/tests/auto/other/android/android.pro
      +++ b/qtbase/tests/auto/other/android/android.pro
      @@ -1,6 +1,9 @@
       CONFIG += testcase
       TARGET = tst_android
       QT = core testlib
      +android {
      +  QT += gui
      +}
       
       SOURCES += \
           tst_android.cpp
       

      Actually others files fails to build in the parent dir. It could be patched with:

      --- a/qtbase/tests/auto/other/android/android.pro
      +++ b/qtbase/tests/auto/other/android/android.pro
      @@ -1,6 +1,9 @@
       CONFIG += testcase
       TARGET = tst_android
       QT = core testlib
      +android {
      +  QT += gui
      +}
       
       SOURCES += \
           tst_android.cpp
      --- a/qtbase/tests/auto/other/qobjectrace/qobjectrace.pro
      +++ b/qtbase/tests/auto/other/qobjectrace/qobjectrace.pro
      @@ -1,6 +1,9 @@
       CONFIG += testcase
       SOURCES += tst_qobjectrace.cpp
       QT = core testlib
      +android {
      +  QT += gui
      +}
       
       INCLUDEPATH += ../../../shared/
       HEADERS += ../../../shared/emulationdetector.h
      --- a/qtbase/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro
      +++ b/qtbase/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro
      @@ -1,4 +1,3 @@
       SOURCES = main.cpp
      -CONFIG -= qt
       CONFIG += cmdline
       DESTDIR = ./
      --- a/qtbase/tests/auto/other/qtokenautomaton/qtokenautomaton.pro
      +++ b/qtbase/tests/auto/other/qtokenautomaton/qtokenautomaton.pro
      @@ -16,3 +16,6 @@
                  tokenizers/withNamespace/withNamespace.h
       
       QT = core testlib
      +android {
      +  QT += gui
      +}
      --- a/qtbase/tests/auto/other/toolsupport/toolsupport.pro
      +++ b/qtbase/tests/auto/other/toolsupport/toolsupport.pro
      @@ -2,3 +2,6 @@
       TARGET = tst_toolsupport
       QT = testlib core-private
       SOURCES = $$PWD/tst_toolsupport.cpp
      +android {
      +  QT += gui
      +}
       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            ban F S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes