tools: when running the test suite, start the debug-gui minimized
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 2 Jul 2020 23:55:37 +0000 (09:55 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 7 Jul 2020 08:51:33 +0000 (18:51 +1000)
This allows us to run the option parsing test without getting interrupted by a
million debug-gui windows popping up for half a second.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-debug-gui.c
tools/test_tool_option_parsing.py

index e594ff9879ebca68f5f7366c72eb519bef0a12a1..3d7df1b2f0469f2200c9bfdb07b5c925da6fb41d 100644 (file)
@@ -809,6 +809,8 @@ window_init(struct window *w)
        list_init(&w->evdev_devices);
 
        w->win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+       if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
+               gtk_window_iconify(GTK_WINDOW(w->win));
        gtk_widget_set_events(w->win, 0);
        gtk_window_set_title(GTK_WINDOW(w->win), "libinput debugging tool");
        gtk_window_set_default_size(GTK_WINDOW(w->win), 1024, 768);
index d059d914f82299015a10808a1810c7fb753b2a9f..373aa8b91d0a99c28b7ee9f9472a740cf6cbae97 100755 (executable)
@@ -354,6 +354,8 @@ def main():
 
     args += ['@MESON_BUILD_ROOT@']
 
+    os.environ['LIBINPUT_RUNNING_TEST_SUITE'] = '1'
+
     return subprocess.run([sys.executable] + args).returncode