Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate why qmltestrunner tests fail on macOS in CI #110

Closed
ahayzen-kdab opened this issue Mar 10, 2022 · 2 comments
Closed

Investigate why qmltestrunner tests fail on macOS in CI #110

ahayzen-kdab opened this issue Mar 10, 2022 · 2 comments
Labels
🪲 bug Something isn't working ❔ help wanted Extra attention is needed

Comments

@ahayzen-kdab
Copy link
Collaborator

We currently need to disable example_qml_extension_plugin_test tests on macOS as it fails to import QtQuick module.

@ahayzen-kdab ahayzen-kdab added 🪲 bug Something isn't working ❔ help wanted Extra attention is needed labels Mar 10, 2022
@Be-ing
Copy link
Contributor

Be-ing commented Mar 10, 2022

I suspect this is a bug in qmltestrunner when statically linked to Qt.

LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Feb 23, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
@LeonMatthesKDAB
Copy link
Collaborator

After removing the qmltestrunner dependency in #453, the macOS test runner still fails, with this error:

qt.core.plugin.loader: Cannot load '/Users/runner/cxx-qt/build/examples/qml_extension_plugin/qml/com/kdab/cxx_qt/demo/libcore_qmlplugin.dylib' into a statically linked Qt library.
********* Start testing of qml_extension_plugin *********
Config: Using QtTest library 6.4.2, Qt 6.4.2 (x86_64-little_endian-lp64 static release build; by Apple LLVM 13.0.0 (clang-1300.0.29.30)), macos 11.7
QWARN  : qml_extension_plugin::tst_myobject::compile() 
  /Users/runner/cxx-qt/examples/qml_extension_plugin/tests/tst_myobject.qml produced 1 error(s):
    /Users/runner/cxx-qt/examples/qml_extension_plugin/tests/tst_myobject.qml:9,1: Unknown error
  Working directory: /Users/runner/cxx-qt/build/examples/qml_extension_plugin/tests
  Import paths:
    '/Users/runner/cxx-qt/build/examples/qml_extension_plugin/qml'
    '/Users/runner/cxx-qt/build/examples/qml_extension_plugin/tests'
    'qrc:/qt-project.org/imports'
  Plugin paths:
    '.'

FAIL!  : qml_extension_plugin::tst_myobject::compile() Unknown error
   Loc: [/Users/runner/cxx-qt/examples/qml_extension_plugin/tests/tst_myobject.qml(9)]
Totals: 0 passed, 1 failed, 0 skipped, 0 blacklisted, 1ms

It seems the root cause is that a statically linked Qt can't load any plugins!
Which means we would have to test this by dynamically linking to Qt.
Probably not worth it to change the CI build process just for this though.
What do you think @Be-ing ?

LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Mar 7, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
ahayzen-kdab pushed a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Mar 7, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
Use QTest directly, this fixes the build on my Fedora machine, which
only provides qmltestrunner linked with Qt5.
This might fix KDAB#110 as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working ❔ help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants