diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-10 15:03:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-10 15:03:10 +0000 |
commit | aeb8e902d459cf6a29dfb707bdf0e69af2aeb456 (patch) | |
tree | 3a0d9145eb309c9ca9bd1476ad9b30ff5e871450 /sim-scripts/gdb-sim-run.in | |
parent | 2009-08-07 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-testing-aeb8e902d459cf6a29dfb707bdf0e69af2aeb456.tar.bz2 |
2009-08-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile: Fix dependencies on tsim scripts.
* edb7312.in: Disable instruction limit until tuned. Only do coverage
on 1 MB of RAM. Code is smaller than that and it is faster.
* gdb-sim-run.in: Clean up killing simulator to hopefully avoid
zero length coverage files.
* rtl22xx.in: Attempt to add coverage and shutdown device support.
* smdk2410.in: Add coverage and shutdown device support.
* tsim-support: Tune time limits.
Diffstat (limited to 'sim-scripts/gdb-sim-run.in')
-rwxr-xr-x | sim-scripts/gdb-sim-run.in | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index d165262..bfbc1e1 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -153,6 +153,18 @@ test ${verbose} = "yes" && echo Using ${runBSP} type ${runBSP} check_status $? "Path appears to be broken (cannot find ${runBSP})" +killpid() +{ + pid=$1 + kill -2 $pid 2> /dev/null + if [ ${coverage} = "yes" ] ; then + sleep 1 + else + usleep 1000 + fi + kill -9 $pid 2> /dev/null +} + ## These are faults any BSP may generate. They are common to RTEMS. checkGenericExits() { @@ -177,9 +189,7 @@ checkGenericExits() kill -0 $pid 2> /dev/null running=$? if [ $running -eq 0 ] ; then - kill -2 ${pid} 2>/dev/null # SIGINT - sleep 1 - kill -9 ${pid} 2>/dev/null + killpid ${pid} else return 1 fi @@ -260,9 +270,7 @@ runtest() running=$? if [ $running -eq 0 ] ; then if [ ${milliseconds} -ge ${millilimit} ]; then - kill -2 $pid 2> /dev/null - usleep 1000 - kill -9 $pid 2> /dev/null + killpid ${pid} catLog ${logfile} echo "${testname} killed after running ${max_run_time} seconds" break @@ -277,9 +285,7 @@ runtest() checkGenericExits ${logfile} #>/dev/null 2>&1 genericExits=$? if [ ${bspFaults} -ne 0 -o ${genericExits} -ne 0 ] ; then - kill -2 $pid 2> /dev/null - usleep 1000 - kill -9 ${pid} >/dev/null 2>&1 + killpid ${pid} catLog ${logfile} echo Ran in ${milliseconds} milliseconds break @@ -292,7 +298,6 @@ runtest() break fi done - kill -9 $pid >/dev/null 2>&1 } if [ "X${args}" = "X" ] ; then |