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

tst_qqmlenginecleanup::test_customModuleCleanup() broken on Android

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Android

      Description

      tst_qqmlenginecleanup::test_customModuleCleanup() is broken on Android.

      It says:

      ********* Start testing of tst_qqmlenginecleanup *********
      Config: Using QtTest library 6.4.0, Qt 6.4.0 (arm64-little_endian-lp64 shared (dynamic) debug build; by Clang 12.0.8 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)), android 12.0
      PASS   : tst_qqmlenginecleanup::initTestCase()
      PASS   : tst_qqmlenginecleanup::test_qmlClearTypeRegistrations()
      PASS   : tst_qqmlenginecleanup::test_valueTypeProviderModule()
      FAIL!  : tst_qqmlenginecleanup::test_customModuleCleanup() 'component.status() == QQmlComponent::Ready' returned FALSE. (Attempt #0 ::1 module "CustomModule" is not installed
      )
         Loc: [/home/andreasbuhr/development/qtdev/qtdeclarative/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp(191)]
      PASS   : tst_qqmlenginecleanup::cleanupTestCase()
      Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 3380ms
      ********* Finished testing of tst_qqmlenginecleanup *********
      
      

      Because CustomModule is only used in a string, I created a new qml file in data/ importing CustomModule to let qmlimportscanner know CustomModule is used.

      But then, it does not find it. I get the message

      Warning: QML import could not be resolved in any of the import paths: CustomModule
      

      Looking for the reason I found the following:

      1. When android-tst_qqmlenginecleanup-deployment-settings.json is generated, the dependency seems to be known. That json file contains

       "extraLibraryDirs" : [ "/data/androidbuild_armv8/qtdeclarative-android/tests/auto/qml/qqmlenginecleanup/CustomModule",
      

      and this is indeed the correct directory. However, androiddeployqt does not forward it to qmlimportscanner. After enabling verbose output, I see the message

      Running qmlimportscanner with the following command: /data/androidbuild_armv8/qtbase/libexec/qmlimportscanner -rootPath /home/andreasbuhr/development/qtdev/qtdeclarative/tests/auto/qml/qqmlenginecleanup/data/ -rootPath /home/andreasbuhr/development/qtdev/qtdeclarative/tests/auto/qml/qqmlenginecleanup/ -importPath /data/androidbuild_armv8/qtbase-android/qml /home/andreasbuhr/development/qtdev/qtdeclarative/tests/auto/qml/qqmlenginecleanup/data/ /home/andreasbuhr/development/qtdev/qtdeclarative/tests/auto/qml/qqmlenginecleanup/
      

      So qmlimportscanner is not told about this directory containing CustomModule.

      How to solve this?

        Attachments

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

          Activity

            People

            Assignee:
            qtandroidteam Qt Android Team
            Reporter:
            andreasbuhr Andreas Buhr
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes