[gnome-desktop/wip/hadess/thumbnail-font-cache] tests: Output reftest output in build dir



commit 54e68c9f486e04529987a5a328216116309955ac
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 8 16:16:27 2019 +0100

    tests: Output reftest output in build dir
    
    So that failed tests can have their data exported from the CI.

 tests/wallclock-reftest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/wallclock-reftest.c b/tests/wallclock-reftest.c
index 6428ebe4..6d582597 100644
--- a/tests/wallclock-reftest.c
+++ b/tests/wallclock-reftest.c
@@ -27,6 +27,8 @@
 #define GNOME_DESKTOP_USE_UNSTABLE_API 1
 #include <libgnome-desktop/gnome-wall-clock.h>
 
+static const char *output_dir = NULL;
+
 typedef enum {
   SNAPSHOT_WINDOW,
   SNAPSHOT_DRAW
@@ -39,7 +41,6 @@ static char *
 get_output_file (const char *test_file,
                  const char *extension)
 {
-  const char *output_dir = g_get_tmp_dir ();
   char *result, *base;
 
   base = g_path_get_basename (test_file);
@@ -578,6 +579,9 @@ main (int argc, char **argv)
   basedir = g_getenv ("G_TEST_SRCDIR");
   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]