tests: add subsurface-shot test

This is marked as a FAIL_TEST, because the last image comparison fails
due to a bug in Weston.

Jointly authored by Pekka and Emilio.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Micah Fedke <micah.fedke@collabora.co.uk>
[Pekka: move weston-tests-env as terminator to EXTRA_DIST, change
ok/FAIL to PASS/FAIL, write diff image only on fail.]
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
diff --git a/Makefile.am b/Makefile.am
index 5007c5f..cdf82ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1213,6 +1213,7 @@
 	viewporter.weston			\
 	roles.weston				\
 	subsurface.weston			\
+	subsurface-shot.weston			\
 	devices.weston
 
 ivi_tests =
@@ -1373,6 +1374,10 @@
 subsurface_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
 subsurface_weston_LDADD = libtest-client.la
 
+subsurface_shot_weston_SOURCES = tests/subsurface-shot-test.c
+subsurface_shot_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
+subsurface_shot_weston_LDADD = libtest-client.la
+
 presentation_weston_SOURCES = 			\
 	tests/presentation-test.c		\
 	shared/helpers.h
@@ -1482,10 +1487,15 @@
 	tools/zunitc/test/zunitc_test.c
 
 EXTRA_DIST +=							\
-	tests/weston-tests-env					\
 	tests/internal-screenshot.ini				\
 	tests/reference/internal-screenshot-bad-00.png		\
-	tests/reference/internal-screenshot-good-00.png
+	tests/reference/internal-screenshot-good-00.png		\
+	tests/reference/subsurface_z_order-00.png		\
+	tests/reference/subsurface_z_order-01.png		\
+	tests/reference/subsurface_z_order-02.png		\
+	tests/reference/subsurface_z_order-03.png		\
+	tests/reference/subsurface_z_order-04.png		\
+	tests/weston-tests-env
 
 BUILT_SOURCES +=				\
 	protocol/weston-test-protocol.c	\