diff --git a/tests/internal-screenshot-test.c b/tests/internal-screenshot-test.c index fb5ed5f8..e1a7c43b 100644 --- a/tests/internal-screenshot-test.c +++ b/tests/internal-screenshot-test.c @@ -29,8 +29,24 @@ #include #include "weston-test-client-helper.h" +#include "weston-test-fixture-compositor.h" +#include "test-config.h" -char *server_parameters="--use-pixman --width=320 --height=240"; +static enum test_result_code +fixture_setup(struct weston_test_harness *harness) +{ + struct compositor_setup setup; + + compositor_setup_defaults(&setup); + setup.renderer = RENDERER_PIXMAN; + setup.width = 320; + setup.height = 240; + setup.shell = SHELL_DESKTOP; + setup.config_file = TESTSUITE_INTERNAL_SCREENSHOT_CONFIG_PATH; + + return weston_test_harness_execute_as_client(harness, &setup); +} +DECLARE_FIXTURE_SETUP(fixture_setup); static void draw_stuff(pixman_image_t *image) diff --git a/tests/meson.build b/tests/meson.build index 14582478..2daf9cff 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -111,6 +111,7 @@ dep_zucmain = declare_dependency( ) tests = [ + { 'name': 'internal-screenshot', }, { 'name': 'plugin-registry', }, { 'name': 'roles', }, { 'name': 'string', }, @@ -153,7 +154,6 @@ tests_weston = [ linux_explicit_synchronization_unstable_v1_protocol_c, ] ], - ['internal-screenshot'], [ 'presentation', [ @@ -257,6 +257,7 @@ test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap) test_config_h.set_quoted('WESTON_DATA_DIR', join_paths(meson.current_source_dir(), '..', 'data')) test_config_h.set_quoted('TESTSUITE_PLUGIN_PATH', exe_plugin_test.full_path()) test_config_h.set_quoted('TESTSUITE_IVI_CONFIG_PATH', join_paths(meson.current_build_dir(), '../ivi-shell/weston-ivi-test.ini')) +test_config_h.set_quoted('TESTSUITE_INTERNAL_SCREENSHOT_CONFIG_PATH', join_paths(meson.current_source_dir(), 'internal-screenshot.ini')) configure_file(output: 'test-config.h', configuration: test_config_h) foreach t : tests