Commit Graph

4 Commits

Author SHA1 Message Date
Jehan 449a91b1c9 build: fix again the `xvfb-run` call to work on various distributions.
This tool seems like a mess with various implementations (maybe
distributions patch it?). I'm trying to tweak the script so that it
works at least on the Debian testing/bookworm CI and on my Fedora 33
desktop (and hopefully on more, if not all distribs).
2021-11-14 22:14:59 +01:00
Jehan 588ff7c8d3 build: xvfb-run call from meson fails.
Note that I first thought to use the full option name (`--auto-display`)
but I just got the same error again. It seems xvfb-run from Debian
bookworm just doesn't have this option, and only the older option
--auto-servernum (which is said to be deprecated in favor of
--auto-display in Fedora's xvfb-run for instance, but apparently not on
Debian). At least this works on all distributions (or so it would seem).

Fixes:

> xvfb-run: invalid option -- 'd'
2021-11-14 20:58:19 +01:00
Jehan 9bc9ef0889 build: use POSIX test syntax.
The [[ ]] is not POSIX, hence less portable.
I see our `ninja test` calls in Gitlab CI output a:

> /builds/GNOME/gimp/build/meson/run_test_env.sh: 7: [[: not found

(though it doesn't break the tests)
2021-11-14 20:58:13 +01:00
Niels De Graef 0352559efa meson: Allow running tests headless
This commit makes sure we can properly run the tests in a headless
environment, i.e. they don't mess with the user's X display or their
session bus. The latter is also needed for parallel tests as they fail
to simultaneously own the same name on the session bus.

Replaced the "xvfb-run" meson option with the "headless" option, which
is more intuitive (and also more correct, since we now also require
`dbus-run-session` to run the tests, not only `xvfb-run`).

Finally, note that we need a version of `xvfb-run` that supports the
`-d` (`--auto-display`) option. The problem with `--auto-servernum`
which is also regularly used, is that it doesn't shut down cleanly,
returning a non-zero exit code, wich makes the test fail.

Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/5078
2020-05-14 18:31:08 +02:00