[gnome-desktop-testing/wip/hadess/create-log-dir] Create log directory



commit ce0ff3ff1574f5dc4ba51ae8d1bd230e5d16b3cf
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 4 14:27:25 2019 +0100

    Create log directory
    
    Just as for the failed tests output directory, create the successful
    tests directory before trying to output to it. For example, this
    should create a “log-directory” directory:
    gnome-desktop-testing-runner -L log-directory glib/gdatetime.test

 src/gnome-desktop-testing-runner.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c
index 7987936..95b1cb6 100644
--- a/src/gnome-desktop-testing-runner.c
+++ b/src/gnome-desktop-testing-runner.c
@@ -628,6 +628,9 @@ run_test_async (GdtrTest                *test,
         }
     }
 
+  if (opt_log_directory)
+    g_mkdir_with_parents (opt_log_directory, 0755);
+
   /* We create a .testtmp stamp file so that tests can *know* for sure
    * they're in a temporary directory.  This is used by at least the
    * OSTree tests as protection against someone running a test script


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