From 3a9627e63cade0461d32762af89e601ed4bf63ee Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 10 Dec 2023 13:14:20 +0100 Subject: [PATCH] Test if xvfb-run supports -d (Arch only) --- tests/meson.build | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 1b2e81a..4b06a89 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -36,13 +36,22 @@ if check.found() xvfb = find_program('xvfb-run', required: get_option('tests')) if xvfb.found() + xvfb_args = ['-s', '-screen 0 1400x900x24 -ac +extension GLX +render -noreset'] + xvfb_h_output = run_command(xvfb, '-h', capture: true, check: false) + if xvfb_h_output.stdout().contains('--auto-display') + # becasue Arch + xvfb_args += ['-d'] + else + xvfb_args += ['-a'] + endif + session = executable('test_session', ['test_session.c', 'tests.c'], dependencies: build_dependencies + test_dependencies, include_directories: include_directories, c_args: defines + flags ) test('session', xvfb, - args: ['-a', '-s', '-screen 0 1400x900x24 -ac +extension GLX +render -noreset', session], + args: xvfb_args + [session], timeout: 60*60 ) @@ -53,7 +62,7 @@ if check.found() c_args: defines + flags ) test('sandbox', xvfb, - args: ['-a', '-s', '-screen 0 1400x900x24 -ac +extension GLX +render -noreset', sandbox], + args: xvfb_args + [sandbox], timeout: 60*60 ) endif