forked from Imagelibrary/rtems
2008-08-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* runtest: Attempt to prevent runaways.
This commit is contained in:
@@ -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>
|
2008-08-07 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* runtest: Major update. Now more likely not to run away.
|
* runtest: Major update. Now more likely not to run away.
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ args=$*
|
|||||||
tests="$args"
|
tests="$args"
|
||||||
if [ ! "$tests" ]
|
if [ ! "$tests" ]
|
||||||
then
|
then
|
||||||
set -- `echo *.exe`
|
set -- `ls -1 *.exe *.ralf 2>/dev/null`
|
||||||
tests="$*"
|
tests="$*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ do
|
|||||||
fatal "Cannot currently generate device files"
|
fatal "Cannot currently generate device files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Spin off the simulator in the background
|
# Spin off the simulator in the background
|
||||||
|
|
||||||
${simulator} --board=jmr3904 $tfile </dev/null | \
|
${simulator} --board=jmr3904 $tfile </dev/null | \
|
||||||
sed -e 's/
|
sed -e 's/
|
||||||
@@ -233,8 +233,8 @@ do
|
|||||||
milliseconds=`expr ${milliseconds} + 10`
|
milliseconds=`expr ${milliseconds} + 10`
|
||||||
kill -0 $pid 2> /dev/null
|
kill -0 $pid 2> /dev/null
|
||||||
running=$?
|
running=$?
|
||||||
if [ $running -eq 0 ] ; then
|
if [ $running -eq 0 ] ; then
|
||||||
if [ ${milliseconds} -ge ${millilimit} ]; then
|
if [ ${milliseconds} -ge ${millilimit} ]; then
|
||||||
kill -9 $pid 2> /dev/null
|
kill -9 $pid 2> /dev/null
|
||||||
#cat ${logfile}
|
#cat ${logfile}
|
||||||
echo "${tname} killed after running ${max_run_time} seconds"
|
echo "${tname} killed after running ${max_run_time} seconds"
|
||||||
@@ -243,14 +243,14 @@ do
|
|||||||
grep "^Unhandled exception" ${logfile} >/dev/null
|
grep "^Unhandled exception" ${logfile} >/dev/null
|
||||||
exceptionExit=$?
|
exceptionExit=$?
|
||||||
grep "^mips-core: " ${logfile} >/dev/null
|
grep "^mips-core: " ${logfile} >/dev/null
|
||||||
badAccessExit=$?
|
badAccessExit=$?
|
||||||
if [ $badAccessExit -eq 0 -o $exceptionExit -eq 0 ] ; then
|
if [ $badAccessExit -eq 0 -o $exceptionExit -eq 0 ] ; then
|
||||||
kill -9 ${pid} >/dev/null 2>&1
|
kill -9 ${pid} >/dev/null 2>&1
|
||||||
#cat ${logfile}
|
#cat ${logfile}
|
||||||
# echo Ran in ${milliseconds} milliseconds
|
# echo Ran in ${milliseconds} milliseconds
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
# done normally
|
# done normally
|
||||||
# cat ${logfile}
|
# cat ${logfile}
|
||||||
# echo "${tname} ran in ${milliseconds} milliseconds"
|
# echo "${tname} ran in ${milliseconds} milliseconds"
|
||||||
|
|||||||
Reference in New Issue
Block a user