testsuite: Improve --generate support
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jan 2020 00:32:40 +0000 (19:32 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Jan 2020 23:32:05 +0000 (18:32 -0500)
We don't want annoying spew from GTest when
using --generate, since it interferes with just
piping the output to a text file.

testsuite/css/style/test-css-style.c

index fd998472bf3e00a5865793420eaad91ab325eccd..9c9cbb18e553f1e0ba0837d141f321d760935263 100644 (file)
@@ -244,7 +244,10 @@ main (int argc, char **argv)
 {
   g_setenv ("GTK_CSS_DEBUG", "1", TRUE);
 
-  gtk_test_init (&argc, &argv);
+  if (argc >= 2 && strcmp (argv[1], "--generate") == 0)
+    gtk_init ();
+  else
+    gtk_test_init (&argc, &argv);
 
   g_object_set (gtk_settings_get_default (),
                 "gtk-font-name", "Sans",