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

qt_internal_add_test doesn't call qt_import_qml_plugins

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.0.3, 6.1.0, 6.2
    • Build System: CMake
    • None

    Description

      Currently tests created by qt_internal_add_test don't have qmlimportscanner run for them (via qt_import_qml_plugins).
      This means that in a static Qt build, if the test needs some qml plugins, the test will fail at runtime saying some qml import has failed.

      In examples added by the public qt_add_executable, we run qt_import_qml_plugins via scope finalizers.

      For tests we have a few options:

      • call qt_import_qml_plugins directly in qt_internal_add_test()
      • Call it via scope finalizer (only this one function)
      • Call all scope finalizers like we do in qt_add_executable. This might prove problematic to implement.

      We can't call qt_import_qml_plugins when building the qtdeclarative tests as part of the overall qtdeclarative build (or a top-level build), but we can do it for standalone test builds, which is what is used by the CI.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes