tests: add test-desktop-shell
This is a new desktop shell plugin, specifically written for tests. It
implements the bare minimum of a WM with predictable window positioning.
It offers a known static background without forking any helper clients
and therefore avoids any races with executing screenshot-based tests.
Not forking unused helper clients also reduces the load during a test
run.
The code was written by Quentin as a part of a much larger private
patch. Pekka, following Emilio's example, extracted just the shell
plugin parts as a stand-alone patch and wrote the commit message.
[Emilio: update to latest weston_layer and shell_init API]
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
[Pekka: fix build]
diff --git a/Makefile.am b/Makefile.am
index e798dee..5007c5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1236,6 +1236,7 @@
noinst_LTLIBRARIES += \
weston-test.la \
+ weston-test-desktop-shell.la \
$(module_tests) \
libtest-runner.la \
libtest-client.la
@@ -1278,6 +1279,13 @@
protocol/weston-test-protocol.c \
protocol/weston-test-server-protocol.h
+weston_test_desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
+weston_test_desktop_shell_la_LDFLAGS = $(test_module_ldflags)
+weston_test_desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
+weston_test_desktop_shell_la_SOURCES = \
+ tests/weston-test-desktop-shell.c \
+ shared/helpers.h
+
if ENABLE_EGL
weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
weston_test_la_LDFLAGS += $(EGL_TESTS_LIBS)