testsuite: Add test setups for backends
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 May 2020 13:23:25 +0000 (09:23 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 May 2020 18:11:53 +0000 (14:11 -0400)
Add test setups that set the GDK_BACKEND and
TEST_OUTPUT_SUBDIR environment variables.

This lets use run
meson test --setup x11 --suite reftest
meson test --setup wayland --suite reftest
and the output will be nicely separated.

We still need to do compositor / display server
setup from the outside.

testsuite/meson.build

index e5c0abe3981655feaad39420f487f875a1739066..c862cebb1af802d7fe6021be7ac9a2bf51f13a1f 100644 (file)
@@ -6,6 +6,19 @@ installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
 # otherwise we're going to have failures down the line
 diff = find_program('diff', required: true)
 
+add_test_setup ('x11',
+                is_default: true,
+                env: ['GDK_BACKEND=x11',
+                      'TEST_OUTPUT_SUBDIR=x11' ])
+
+add_test_setup ('wayland',
+                env: ['GDK_BACKEND=wayland',
+                      'TEST_OUTPUT_SUBDIR=wayland' ])
+
+add_test_setup ('broadway',
+                env: ['GDK_BACKEND=broadway',
+                      'TEST_OUTPUT_SUBDIR=broadway' ])
+
 subdir('performance')
 subdir('gdk')
 subdir('gsk')