tests: Speed up runtime using immediate repaint on capture
The test suite is throttled by the headless backend repaint timer. This commit uses the headless refresh rate option to speed up runtime by using the immediate repaint-only-on-capture mode by default. Tests which don't support that mode yet override the refresh value to use the highest rate possible. Fixes #682 Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
7b2eddf022
commit
343adb2acd
|
@ -71,6 +71,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.width = BLOCK_WIDTH * ALPHA_STEPS;
|
||||
setup.height = 16;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
if (arg->color_management) {
|
||||
#if !BUILD_COLOR_LCMS
|
||||
|
|
|
@ -43,6 +43,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.scale = arg->scale;
|
||||
setup.transform = arg->transform;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -234,6 +234,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.height = WINDOW_HEIGHT;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,color-lcms-profiles,color-lcms-transformations,color-lcms-optimizer";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
file_name = output_filename_for_fixture(THIS_TEST_NAME, harness,
|
||||
arg->meta.name, "icm");
|
||||
|
|
|
@ -640,6 +640,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
compositor_setup_defaults(&setup);
|
||||
setup.renderer = WESTON_RENDERER_GL;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
/* Create the sRGB ICC profile. We do that only once for this test
|
||||
* program. */
|
||||
|
|
|
@ -49,6 +49,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
compositor_setup_defaults(&setup);
|
||||
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
setup.width = 320;
|
||||
setup.height = 240;
|
||||
setup.shell = SHELL_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
weston_ini_setup (&setup,
|
||||
cfgln("[shell]"),
|
||||
|
|
|
@ -39,6 +39,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
compositor_setup_defaults(&setup);
|
||||
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
/* We need to use the pixman renderer, since a few of the tests depend
|
||||
* on the renderer holding onto a surface buffer until the next one
|
||||
|
|
|
@ -103,6 +103,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.scale = arg->scale;
|
||||
setup.transform = arg->transform;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
/*
|
||||
* The test here works by swapping the whole wl_surface into a
|
||||
|
|
|
@ -92,6 +92,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.scale = arg->scale;
|
||||
setup.transform = arg->transform;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.height = 240;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,test-harness-plugin";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.width = 320;
|
||||
setup.height = 240;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,proto,test-harness-plugin";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.height = 240;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,test-harness-plugin";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ fixture_setup(struct weston_test_harness *harness, const struct setup_args *arg)
|
|||
setup.height = 240;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,test-harness-plugin";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ fixture_setup(struct weston_test_harness *harness,
|
|||
compositor_setup_defaults(&setup);
|
||||
setup.renderer = arg->renderer;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
|
||||
compositor_setup_defaults(&setup);
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
|
@ -194,6 +194,7 @@ compositor_setup_defaults_(struct compositor_setup *setup,
|
|||
.width = 320,
|
||||
.height = 240,
|
||||
.scale = 1,
|
||||
.refresh = 0,
|
||||
.transform = WL_OUTPUT_TRANSFORM_NORMAL,
|
||||
.config_file = NULL,
|
||||
.extra_module = NULL,
|
||||
|
@ -319,6 +320,12 @@ execute_compositor(const struct compositor_setup *setup,
|
|||
prog_args_take(&args, tmp);
|
||||
}
|
||||
|
||||
if (setup->refresh >= 0 &&
|
||||
setup->backend == WESTON_BACKEND_HEADLESS) {
|
||||
str_printf(&tmp, "--refresh-rate=%d", setup->refresh);
|
||||
prog_args_take(&args, tmp);
|
||||
}
|
||||
|
||||
if (setup->config_file) {
|
||||
str_printf(&tmp, "--config=%s", setup->config_file);
|
||||
prog_args_take(&args, tmp);
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
|
||||
#include "weston-testsuite-data.h"
|
||||
|
||||
/* Compositor configuration defaults to a refresh rate of 0 to repaint only on
|
||||
* captures immediately. This allows to run the test suite as fast as
|
||||
* possible. Tests not supporting that mode can fallback to the highest refresh
|
||||
* rate using that constant. */
|
||||
#define HIGHEST_OUTPUT_REFRESH 1000000
|
||||
|
||||
/** Weston shell plugin
|
||||
*
|
||||
* \sa compositor_setup
|
||||
|
@ -73,6 +79,8 @@ struct compositor_setup {
|
|||
unsigned height;
|
||||
/** Default output scale. */
|
||||
int scale;
|
||||
/** Default output refresh rate (headless backend). */
|
||||
int refresh;
|
||||
/** Default output transform, one of WL_OUTPUT_TRANSFORM_*. */
|
||||
enum wl_output_transform transform;
|
||||
/** The absolute path to \c weston.ini to use,
|
||||
|
|
|
@ -49,6 +49,7 @@ fixture_setup(struct weston_test_harness *harness)
|
|||
setup.height = 264;
|
||||
setup.shell = SHELL_TEST_DESKTOP;
|
||||
setup.logging_scopes = "log,gl-shader-generator";
|
||||
setup.refresh = HIGHEST_OUTPUT_REFRESH;
|
||||
|
||||
return weston_test_harness_execute_as_client(harness, &setup);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue