Bring back screen logs for noninteractive runs.
* functions(screen_it): Prior to 58e2134
screen logs were generated
even when run without $SCREEN_DEV. We want to be able to capture
these with devstack-gate for later inspection, so this patch
reintroduces that capability.
Change-Id: Ife127b47d7700878e02285281854595bc6585972
This commit is contained in:
parent
bd02bfb416
commit
25ebbcd1a7
12
functions
12
functions
@ -747,17 +747,19 @@ function screen_it {
|
|||||||
screen_rc "$1" "$2"
|
screen_rc "$1" "$2"
|
||||||
|
|
||||||
screen -S $SCREEN_NAME -X screen -t $1
|
screen -S $SCREEN_NAME -X screen -t $1
|
||||||
|
|
||||||
|
if [[ -n ${SCREEN_LOGDIR} ]]; then
|
||||||
|
screen -S $SCREEN_NAME -p $1 -X logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log
|
||||||
|
screen -S $SCREEN_NAME -p $1 -X log on
|
||||||
|
ln -sf ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${1}.log
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$SCREEN_DEV" = "True" ]]; then
|
if [[ "$SCREEN_DEV" = "True" ]]; then
|
||||||
# sleep to allow bash to be ready to be send the command - we are
|
# sleep to allow bash to be ready to be send the command - we are
|
||||||
# creating a new window in screen and then sends characters, so if
|
# creating a new window in screen and then sends characters, so if
|
||||||
# bash isn't running by the time we send the command, nothing happens
|
# bash isn't running by the time we send the command, nothing happens
|
||||||
sleep 1.5
|
sleep 1.5
|
||||||
|
|
||||||
if [[ -n ${SCREEN_LOGDIR} ]]; then
|
|
||||||
screen -S $SCREEN_NAME -p $1 -X logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log
|
|
||||||
screen -S $SCREEN_NAME -p $1 -X log on
|
|
||||||
ln -sf ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${1}.log
|
|
||||||
fi
|
|
||||||
NL=`echo -ne '\015'`
|
NL=`echo -ne '\015'`
|
||||||
screen -S $SCREEN_NAME -p $1 -X stuff "$2 || touch \"$SERVICE_DIR/$SCREEN_NAME/$1.failure\"$NL"
|
screen -S $SCREEN_NAME -p $1 -X stuff "$2 || touch \"$SERVICE_DIR/$SCREEN_NAME/$1.failure\"$NL"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user