diff --git a/meson.build b/meson.build index 7e735607..090fc713 100644 --- a/meson.build +++ b/meson.build @@ -115,6 +115,8 @@ config_h.set_quoted('LIBEXECDIR', dir_libexec) config_h.set_quoted('MODULEDIR', dir_module_weston) config_h.set_quoted('LIBWESTON_MODULEDIR', dir_module_libweston) +config_h.set10('TEST_GL_RENDERER', get_option('test-gl-renderer')) + backend_default = get_option('backend-default') if backend_default == 'auto' foreach b : [ 'headless', 'fbdev', 'x11', 'wayland', 'drm' ] diff --git a/meson_options.txt b/meson_options.txt index c862ecc4..9f6b08c3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -204,6 +204,12 @@ option( value: true, description: 'Tests: output JUnit XML results' ) +option( + 'test-gl-renderer', + type: 'boolean', + value: true, + description: 'Tests: allow running with GL-renderer' +) option( 'doc', type: 'boolean', diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c index ea206be0..0c8004b4 100644 --- a/tests/weston-test-fixture-compositor.c +++ b/tests/weston-test-fixture-compositor.c @@ -229,6 +229,13 @@ execute_compositor(const struct compositor_setup *setup, } #endif +#if !TEST_GL_RENDERER + if (setup->renderer == RENDERER_GL) { + fprintf(stderr, "GL-renderer disabled for tests, skipping.\n"); + return RESULT_SKIP; + } +#endif + prog_args_init(&args); /* argv[0] */