tests: Split out the accessibility dump tests
authorEmmanuele Bassi <ebassi@gnome.org>
Sat, 14 Apr 2018 14:59:12 +0000 (15:59 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Sat, 14 Apr 2018 15:14:10 +0000 (16:14 +0100)
Instead of having a single massive test running through the a11y
directory, we can split off each individual file into its own unit.

Having individual units has several advantages:

 - units are executed in parallel
 - it's easier to identify the failing units
 - logs for failed units are easier to read

testsuite/a11y/meson.build

index 4ae009a2cb5ee7ae1b955967b2a7de36fee4e07f..ddd8f0133e40f29f0577d5bd3e7cbc8a77e0efda 100644 (file)
@@ -1,8 +1,70 @@
 testexecdir = join_paths(installed_test_bindir, 'a11y')
 testdatadir = join_paths(installed_test_datadir, 'a11y')
 
+a11y_state_tests = [
+  'hello-world',
+  'mnemonic',
+  'accessible-name',
+  'notebook',
+  'range',
+  'link',
+  'text',
+  'buttons',
+  'colorchooser',
+  'about',
+  'messagedialog',
+  'expander',
+  'assistant',
+  'pickers',
+  'label',
+  'lockbutton',
+  'spinner',
+  'progress',
+  'infobar',
+  'calendar',
+  'statusbar',
+  'paned',
+  'iconview',
+  'entries',
+  'scale-drawvalue',
+  'placeholder-text',
+  'menu',
+  'menubutton',
+  'menubutton2',
+  'menubutton3',
+  'combos',
+  'listbox',
+  'stack',
+  'headerbar',
+  'tree',
+  'actionbar',
+  'tooltips',
+]
+
+a11y_dump_bin = executable('accessibility-dump',
+  'accessibility-dump.c',
+  dependencies: libgtk_dep,
+)
+
+foreach t: a11y_state_tests
+  ui_path = join_paths(meson.current_source_dir(), t + '.ui')
+  test (t + ' state',
+    a11y_dump_bin,
+    args: [ '--tap', '-k', ui_path ],
+    env: [
+      'GIO_USE_VOLUME_MONITOR=unix',
+      'GSETTINGS_BACKEND=memory',
+      'GTK_CSD=1',
+      'G_ENABLE_DIAGNOSTIC=0',
+      'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+      'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+      'GSETTINGS_SCHEMA_DIR=@0@'.format(gtk_schema_build_dir),
+    ],
+    suite: 'a11y',
+  )
+endforeach
+
 a11y_tests = [
-  'accessibility-dump',
   'tree-performance',
   'text',
   'children',
@@ -22,6 +84,7 @@ foreach t: a11y_tests
                     install_dir: testexecdir,
                     dependencies: libgtk_dep),
         args: [ '--tap', '-k', ],
+        timeout: 120,
         env: [ 'GIO_USE_VOLUME_MONITOR=unix',
                'GSETTINGS_BACKEND=memory',
                'GTK_CSD=1',