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
@@ -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.
+8 -8
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
# Spin off the simulator in the background
${simulator} --board=jmr3904 $tfile | \
${simulator} --board=jmr3904 $tfile </dev/null | \
sed -e 's/␍//' -e '/^$/d' > ${logfile} 2>&1 &
pid=$!
@@ -233,8 +233,8 @@ do
if [ $running -eq 0 ] ; then
if [ ${milliseconds} -ge ${millilimit} ]; then
kill -9 $pid 2> /dev/null
cat ${logfile}
echo "${testname} killed after running ${max_run_time} seconds"
#cat ${logfile}
echo "${tname} killed after running ${max_run_time} seconds"
break
fi
grep "^Unhandled exception" ${logfile} >/dev/null
@@ -243,14 +243,14 @@ do
badAccessExit=$?
if [ $badAccessExit -eq 0 -o $exceptionExit -eq 0 ] ; then
kill -9 ${pid} >/dev/null 2>&1
cat ${logfile}
echo Ran in ${milliseconds} milliseconds
#cat ${logfile}
# echo Ran in ${milliseconds} milliseconds
fi
else
# done normally
cat ${logfile}
echo "${testname} ran in ${milliseconds} milliseconds"
# cat ${logfile}
# echo "${tname} ran in ${milliseconds} milliseconds"
break
fi
done