build, meson: fix headless tests not being run with meson

I noticed that in our CI meson job certain tests were skipped, which didn't
happen with autotools.
On examination I noticed these tests check for HAVE_XVFB_RUN. Even though
meson checks for xvfb-run etc, it doesn't set HAVE_XVFB_RUN.

Adding HAVE_XVFB_RUN allows the tests to run without skipping certain parts.
This commit is contained in:
Jacob Boerema 2023-03-25 17:40:50 -04:00
parent 1d43b65144
commit 078cccf4f5

View file

@ -1198,6 +1198,7 @@ native_rsvg = dependency('librsvg-2.0', version: '>='+rsvg_minver, native: true)
xvfb_run = find_program('xvfb-run', required: get_option('headless-tests'))
dbus_run_session = find_program('dbus-run-session', required: get_option('headless-tests'))
if xvfb_run.found() and dbus_run_session.found()
conf.set('HAVE_XVFB_RUN', true)
add_test_setup('headless',
exe_wrapper: find_program('build' / 'meson' / 'run_test_env.sh'),
is_default: true,