]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
standalone: ensure log dir exists for all users of with_logging
authorIan Campbell <ian.campbell@citrix.com>
Wed, 4 Jun 2014 11:00:02 +0000 (12:00 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 4 Jun 2014 13:38:00 +0000 (14:38 +0100)
By moving the check into that function. Previously at least make-flight was
failing to all ensure_logs

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Ian Jackson <ian.jackson@eu.citrix.com

standalone

index 0f491c16262b746019a910ce4437586350d6c5e0..b5eb9bc542361c2d371ed6d4c26a9d667614680c 100755 (executable)
@@ -135,6 +135,7 @@ ensure_logs() {
 
 with_logging() {
     local log=$1; shift
+    ensure_logs
     $@ 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
@@ -209,8 +210,6 @@ case $op in
 
        job=$1; shift
 
-       ensure_logs
-
         OSSTEST_CONFIG=$config \
        OSSTEST_FLIGHT=$flight \
        OSSTEST_HOST_HOST=$host \
@@ -228,8 +227,6 @@ case $op in
        job=$1; shift
        ts=$1; shift
 
-       ensure_logs
-
        OSSTEST_CONFIG=$config \
        OSSTEST_FLIGHT=$flight \
        OSSTEST_HOST_REUSE=$reuse \