2008-08-15 Joel Sherrill <joel.sherrill@OARcorp.com>

* runtest: Attempt to prevent runaways.
This commit is contained in:
Joel Sherrill
2008-08-15 16:25:23 +00:00
parent e73f9f6b19
commit 84976d0511
2 changed files with 12 additions and 8 deletions

View File

@@ -1,3 +1,7 @@
2008-08-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* runtest: Attempt to prevent runaways.
2008-08-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* runtest: Major update. Now more likely not to run away.

View File

@@ -128,7 +128,7 @@ args=$*
tests="$args"
if [ ! "$tests" ]
then
set -- `echo *.exe`
set -- `ls -1 *.exe *.ralf 2>/dev/null`
tests="$*"
fi
@@ -215,7 +215,7 @@ do
fatal "Cannot currently generate device files"
fi
# Spin off the simulator in the background
# Spin off the simulator in the background
${simulator} --board=jmr3904 $tfile </dev/null | \
sed -e 's/
@@ -233,8 +233,8 @@ do
milliseconds=`expr ${milliseconds} + 10`
kill -0 $pid 2> /dev/null
running=$?
if [ $running -eq 0 ] ; then
if [ ${milliseconds} -ge ${millilimit} ]; then
if [ $running -eq 0 ] ; then
if [ ${milliseconds} -ge ${millilimit} ]; then
kill -9 $pid 2> /dev/null
#cat ${logfile}
echo "${tname} killed after running ${max_run_time} seconds"
@@ -243,14 +243,14 @@ do
grep "^Unhandled exception" ${logfile} >/dev/null
exceptionExit=$?
grep "^mips-core: " ${logfile} >/dev/null
badAccessExit=$?
if [ $badAccessExit -eq 0 -o $exceptionExit -eq 0 ] ; then
badAccessExit=$?
if [ $badAccessExit -eq 0 -o $exceptionExit -eq 0 ] ; then
kill -9 ${pid} >/dev/null 2>&1
#cat ${logfile}
# echo Ran in ${milliseconds} milliseconds
fi
else
else
# done normally
# cat ${logfile}
# echo "${tname} ran in ${milliseconds} milliseconds"