diff mbox

[Xen-devel,OSSTEST,1/3] standalone: ensure log dir exists for all users of with_logging

Message ID 1401887529-13241-1-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell June 4, 2014, 1:12 p.m. UTC
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>
---
 standalone | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox

Patch

diff --git a/standalone b/standalone
index 0f491c1..b5eb9bc 100755
--- a/standalone
+++ b/standalone
@@ -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 \