Skip to contentSkip to conversation

standalone: ensure log dir exists for all users of with_logging

PATCH New Ian Campbell 1 participant 1 message Jun 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 standalone: ensure log dir exists for all users of with_logging

By moving the check into that function. Previously at least make-flight was failing to all ensure_logs

---
 standalone | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
standalone +1 -4
index 0f491c1..b5eb9bc 100755
@@ -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 \
Signature · 1 line
1.9.0