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

Qt5 tests require specific environment #86

Open
hadess opened this issue Mar 22, 2022 · 3 comments
Open

Qt5 tests require specific environment #86

hadess opened this issue Mar 22, 2022 · 3 comments
Labels
qt Related to Qt integration

Comments

@hadess
Copy link
Contributor

hadess commented Mar 22, 2022

The Qt5 tests were run when compiling the libportal RPM, but the tests don't set up their own environment, which means they're bound to fail when, say, a D-Bus daemon, or a display isn't available.

The tests should be self-standing and be runnable without further configuration from the caller. That would also mean that the tests could be run in the GitHub CI, which they currently aren't.

Test running in koji:

+ cd libportal-0.6
+ /usr/bin/meson test -C redhat-linux-build --num-processes 6 --print-errorlogs
ninja: Entering directory `/builddir/build/BUILD/libportal-0.6/redhat-linux-build'
ninja: no work to do.
1/1 Qt unit test FAIL            0.35s   killed by signal 6 SIGABRT
>>> MALLOC_PERTURB_=130 /builddir/build/BUILD/libportal-0.6/redhat-linux-build/tests/qt5/qt-test
Summary of Failures:
1/1 Qt unit test FAIL            0.35s   killed by signal 6 SIGABRT
Ok:                 0   
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   
Full log written to /builddir/build/BUILD/libportal-0.6/redhat-linux-build/meson-logs/testlog.txt

CC @grulja

Full log

@hadess
Copy link
Contributor Author

hadess commented Jun 9, 2022

This still happens.

$ WAYLAND_DISPLAY=invalid DISPLAY=invalid MALLOC_PERTURB_=241 /home/hadess/Projects/Fedora/merged/libportal/libportal-0.6/redhat-linux-build/tests/qt5/qt-test
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.xcb: could not connect to display invalid
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

@smcv
Copy link
Contributor

smcv commented Jun 9, 2022

xvfb-run and dbus-run-session might be helpful here.

@grulja
Copy link
Contributor

grulja commented Jun 24, 2022

@TingPing TingPing added the qt Related to Qt integration label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qt Related to Qt integration
Projects
None yet
Development

No branches or pull requests

4 participants