tests: don't use width and height for drm/fbdev backend tests
authorLeandro Ribeiro <leandro.ribeiro@collabora.com>
Tue, 5 May 2020 19:09:03 +0000 (16:09 -0300)
committerPekka Paalanen <pq@iki.fi>
Tue, 2 Jun 2020 13:47:15 +0000 (13:47 +0000)
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>
tests/weston-test-fixture-compositor.c

index da0fa26a93f629255b9e36dc5530e46205146fdd..1b2df97f3608d6c5bcba2d9c70cb2900d3343da5 100644 (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);