Bug 131386: use 'tee' (in a pipe) instead of 'tail -f' when we need to
display the test output on stdout. This avoids the need to kill the tail process, which is tricky to do under MKS Korn Shell on Windows. Modified Files: all.sh jssqa common/init.sh git-svn-id: svn://10.0.0.236/trunk@131710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -84,30 +84,18 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
||||
. ./init.sh
|
||||
fi
|
||||
|
||||
if [ -z "O_CRON" -o "$O_CRON" != "ON" ]
|
||||
then
|
||||
tail -f ${LOGFILE} &
|
||||
TAILPID=$!
|
||||
fi
|
||||
|
||||
for i in ${TESTS}
|
||||
do
|
||||
SCRIPTNAME=${i}.sh
|
||||
echo "Running Tests for $i"
|
||||
(cd ${QADIR}/$i ; . ./$SCRIPTNAME all file >> ${LOGFILE} 2>&1)
|
||||
if [ "$O_CRON" = "ON" ]
|
||||
then
|
||||
(cd ${QADIR}/$i ; . ./$SCRIPTNAME all file >> ${LOGFILE} 2>&1)
|
||||
else
|
||||
(cd ${QADIR}/$i ; . ./$SCRIPTNAME all file 2>&1 | tee -a ${LOGFILE})
|
||||
fi
|
||||
done
|
||||
|
||||
SCRIPTNAME=all.sh
|
||||
|
||||
if [ -z "O_CRON" -o "$O_CRON" != "ON" ]
|
||||
then
|
||||
kill ${TAILPID}
|
||||
if [ -n "$os_name" -a "$os_name" = "Windows" ]
|
||||
then
|
||||
echo "MKS special - killing the tail -f"
|
||||
kill `ps | grep "tail -f ${LOGFILE}" | grep -v grep |
|
||||
sed -e "s/^ *//" -e "s/ .*//"`
|
||||
fi
|
||||
fi
|
||||
|
||||
. ${QADIR}/common/cleanup.sh
|
||||
|
||||
@@ -80,9 +80,6 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
||||
html_failed "<TR><TD>$*"
|
||||
fi
|
||||
echo "</TABLE><BR>" >> ${RESULTS}
|
||||
if [ -n "${TAILPID}" ]; then
|
||||
${KILL} "${TAILPID}"
|
||||
fi
|
||||
if [ -n "${SERVERPID}" -a -f "${SERVERPID}" ]; then
|
||||
${KILL} `cat ${SERVERPID}`
|
||||
fi
|
||||
|
||||
@@ -202,15 +202,19 @@ jss_test()
|
||||
|
||||
jss_init
|
||||
jss_mode_init
|
||||
if [ -z "O_CRON" -o "$O_CRON" != "ON" -a "$O_WIN" != "ON" ]
|
||||
then
|
||||
tail -f ${JSS_LOGFILE} &
|
||||
TAILPID=$!
|
||||
fi
|
||||
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
if [ "$O_CRON" = "ON" -o "$O_WIN" = "ON" ]
|
||||
then
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
else
|
||||
jss_test 2>&1 | tee -a $JSS_LOGFILE
|
||||
fi
|
||||
BUILD_OPT=1; export BUILD_OPT; Debug "BUILD_OPT $BUILD_OPT"
|
||||
jss_mode_init
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
kill $TAILPID
|
||||
if [ "$O_CRON" = "ON" -o "$O_WIN" = "ON" ]
|
||||
then
|
||||
jss_test >>$JSS_LOGFILE 2>&1
|
||||
else
|
||||
jss_test 2>&1 | tee -a $JSS_LOGFILE
|
||||
fi
|
||||
Exit "jssqa completed. Done `uname -n` $QA_OS_STRING"
|
||||
|
||||
Reference in New Issue
Block a user