[gnome-desktop/wip/hadess/thumbnail-font-cache] fixup! tests: Output reftest output in meson-logs



commit 491d2026d977c08146a72e7bbd8e3f3b8897df1a
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 9 15:47:28 2019 +0100

    fixup! tests: Output reftest output in meson-logs

 tests/wallclock-reftest.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index a0eaed99..fe71b5a5 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -47,7 +47,10 @@ get_output_file (const char *test_file,
   if (g_str_has_suffix (base, ".ui"))
     base[strlen (base) - strlen (".ui")] = '\0';
 
-  result = g_strconcat (output_dir, G_DIR_SEPARATOR_S, "..", G_DIR_SEPARATOR_S, "meson-logs", 
G_DIR_SEPARATOR_S, base, extension, NULL);
+  if (output_dir)
+    result = g_strconcat (output_dir, G_DIR_SEPARATOR_S, "..", G_DIR_SEPARATOR_S, "meson-logs", 
G_DIR_SEPARATOR_S, base, extension, NULL);
+  else
+    result = g_strconcat (g_get_tmp_dir (), G_DIR_SEPARATOR_S, base, extension, NULL);
   g_free (base);
 
   return result;
@@ -580,8 +583,6 @@ main (int argc, char **argv)
   if (basedir == NULL)
     basedir = INSTALLED_TEST_DIR;
   output_dir = g_getenv ("G_TEST_BUILDDIR");
-  if (output_dir == NULL)
-    output_dir = g_get_tmp_dir ();
 
   file = g_file_new_for_commandline_arg (basedir);
   add_test_for_file (file, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]