tests: don't use width and height for drm/fbdev backend tests

In the test suite we have some default options which
are command line arguments used by most of the tests.
Two of these are width==320 and height==240. But
when we have DRM or fbdev backends, width and height
are not possible command line arguments. This makes
impossible to run tests that uses one of these types
of backends, as the compositor won't open if the
command line string is wrong.

Fix this by not passing command line arguments width
and height if the backend is DRM or fbdev.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2020-05-05 16:09:03 -03:00 committed by Pekka Paalanen
parent 2eda978e95
commit e8033e3dd1
1 changed files with 7 additions and 4 deletions

View File

@ -273,11 +273,14 @@ execute_compositor(const struct compositor_setup *setup,
setup->extra_module ? setup->extra_module : "");
prog_args_take(&args, tmp);
asprintf(&tmp, "--width=%d", setup->width);
prog_args_take(&args, tmp);
if (setup->backend != WESTON_BACKEND_DRM &&
setup->backend != WESTON_BACKEND_FBDEV) {
asprintf(&tmp, "--width=%d", setup->width);
prog_args_take(&args, tmp);
asprintf(&tmp, "--height=%d", setup->height);
prog_args_take(&args, tmp);
asprintf(&tmp, "--height=%d", setup->height);
prog_args_take(&args, tmp);
}
if (setup->scale != 1) {
asprintf(&tmp, "--scale=%d", setup->scale);