testsuite: Run the clipboard test in isolation
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Sep 2021 15:24:54 +0000 (11:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Sep 2021 15:38:28 +0000 (11:38 -0400)
We can't have other test pop up windows, and possibly
stealing focus and preventing us from getting data
offers. So, run the clipboard test in isolation.

testsuite/gdk/meson.build

index c259be1f0666ead1c290127ef63cfea0ae8d663b..e3b2e8869a3a162f78bc7ea649b47471be7ae33b 100644 (file)
@@ -10,36 +10,39 @@ clipboard_client = executable('clipboard-client',
                               install_dir: testexecdir)
 
 tests = [
-  'array',
-  'cairo',
-  'clipboard',
-  'contentformats',
-  'contentserializer',
-  'cursor',
-  'display',
-  'displaymanager',
-  'encoding',
-  'keysyms',
-  'memorytexture',
-  'pixbuf',
-  'rectangle',
-  'rgba',
-  'seat',
-  'texture',
-  'texture-threads',
+  { 'name': 'array' },
+  { 'name': 'cairo' },
+  { 'name': 'clipboard', 'parallel': false, },
+  { 'name': 'contentformats' },
+  { 'name': 'contentserializer' },
+  { 'name': 'cursor' },
+  { 'name': 'display' },
+  { 'name': 'displaymanager' },
+  { 'name': 'encoding' },
+  { 'name': 'keysyms' },
+  { 'name': 'memorytexture' },
+  { 'name': 'pixbuf' },
+  { 'name': 'rectangle' },
+  { 'name': 'rgba' },
+  { 'name': 'seat' },
+  { 'name': 'texture' },
+  { 'name': 'texture-threads' },
 ]
 
 foreach t : tests
-  test_exe = executable(t, '@0@.c'.format(t),
+  test_name = t.get('name')
+  test_exe = executable(test_name,
+    sources: '@0@.c'.format(test_name),
     c_args: common_cflags,
     dependencies: libgtk_dep,
     install: get_option('install-tests'),
     install_dir: testexecdir,
   )
 
-  test(t, test_exe,
+  test(test_name, test_exe,
     args: [ '--tap', '-k' ],
     protocol: 'tap',
+    is_parallel: t.get('parallel', false),
     env: [
       'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
       'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
@@ -76,9 +79,10 @@ endforeach
 
 if get_option('install-tests')
   foreach t : tests
+    test_name = t.get('name')
     test_cdata = configuration_data()
     test_cdata.set('testexecdir', testexecdir)
-    test_cdata.set('test', t)
+    test_cdata.set('test', test_name)
     configure_file(input: 'gdk.test.in',
       output: '@0@.test'.format(t),
       configuration: test_cdata,