Browse code

Echo service start failures.

* functions: Previously screen_it would log service start failures by
touching a file, this isn't very useful when working with Jenkins.
Switch to echo'ing that a service failed to start and pipe that through
tee so that we can keep the old behavior of touching a file (note this
behavior is slightly modified and the touched file will now have
contents).

Change-Id: I2d3f272b9a65a9d64dbbc01373a02fccf52f56a8

Clark Boylan authored on 2013/08/17 06:57:38
Showing 1 changed files
... ...
@@ -1063,7 +1063,7 @@ function screen_it {
1063 1063
             sleep 1.5
1064 1064
 
1065 1065
             NL=`echo -ne '\015'`
1066
-            screen -S $SCREEN_NAME -p $1 -X stuff "$2 || touch \"$SERVICE_DIR/$SCREEN_NAME/$1.failure\"$NL"
1066
+            screen -S $SCREEN_NAME -p $1 -X stuff "$2 || echo \"$1 failed to start\" | tee \"$SERVICE_DIR/$SCREEN_NAME/$1.failure\"$NL"
1067 1067
         else
1068 1068
             # Spawn directly without screen
1069 1069
             run_process "$1" "$2" >$SERVICE_DIR/$SCREEN_NAME/$service.pid