Pass common_cflags to testuite/gsk executables
authorTimm Bäder <mail@baedert.org>
Mon, 18 May 2020 09:44:38 +0000 (11:44 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 19 May 2020 06:32:33 +0000 (08:32 +0200)
testsuite/gsk/compare-render.c
testsuite/gsk/meson.build

index 3883ed766ea183757e851e94f9db4f010250150a..f6bdc306755f8431af4ee8b1c7c69d04f263cade 100644 (file)
@@ -18,19 +18,19 @@ get_output_dir (void)
 
   if (arg_output_dir)
     {
-      GFile *file = g_file_new_for_commandline_arg (arg_output_dir);
+      GFile *arg_file = g_file_new_for_commandline_arg (arg_output_dir);
       const char *subdir;
 
       subdir = g_getenv ("TEST_OUTPUT_SUBDIR");
       if (subdir)
         {
-          GFile *child = g_file_get_child (file, subdir);
-          g_object_unref (file);
-          file = child;
+          GFile *child = g_file_get_child (arg_file, subdir);
+          g_object_unref (arg_file);
+          arg_file = child;
         }
 
-      output_dir = g_file_get_path (file);
-      g_object_unref (file);
+      output_dir = g_file_get_path (arg_file);
+      g_object_unref (arg_file);
     }
   else
     {
@@ -60,7 +60,7 @@ get_output_dir (void)
   return output_dir;
 }
 
-char *
+static char *
 file_replace_extension (const char *old_file,
                         const char *old_ext,
                         const char *new_ext)
@@ -180,7 +180,6 @@ main (int argc, char **argv)
   /* Load the render node from the given .node file */
   {
     GBytes *bytes;
-    GError *error = NULL;
     gsize len;
     char *contents;
 
index c72d6a2951caf30ee29a056c6d765fd2d360ec35..6240145569f603406c02e05be11cde446dc439be 100644 (file)
@@ -5,6 +5,7 @@ compare_render = executable(
   'compare-render',
   ['compare-render.c', 'reftest-compare.c'],
   dependencies: libgtk_dep,
+  c_args: common_cflags,
   install: get_option('install-tests'),
   install_dir: testexecdir
 )
@@ -13,6 +14,7 @@ node_parser = executable(
   'node-parser',
   ['node-parser.c'],
   dependencies: libgtk_dep,
+  c_args: common_cflags,
   install: get_option('install-tests'),
   install_dir: testexecdir
 )