diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-18 21:42:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-18 21:42:19 +0000 |
commit | 6871c37d9953527f9dedf82fc725581e1f9bbd0c (patch) | |
tree | ac456fef2750032af6bb3ca1f4f7eb1f363f0a9e /sim-scripts | |
parent | 800a0d7181800e73dfcd87fea8aeae04ebe6a5b7 (diff) |
2009-03-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* edb7312.in, gdb-sim-run.in: Add code coverage support. Tune for
skyeye.
Diffstat (limited to 'sim-scripts')
-rw-r--r-- | sim-scripts/ChangeLog | 5 | ||||
-rw-r--r-- | sim-scripts/edb7312.in | 4 | ||||
-rwxr-xr-x | sim-scripts/gdb-sim-run.in | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/sim-scripts/ChangeLog b/sim-scripts/ChangeLog index 782a2f7..82a7dec 100644 --- a/sim-scripts/ChangeLog +++ b/sim-scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-03-18 Joel Sherrill <joel.sherrill@OARcorp.com> + + * edb7312.in, gdb-sim-run.in: Add code coverage support. Tune for + skyeye. + 2009-03-17 Joel Sherrill <joel.sherrill@oarcorp.com> * gdb-sim-run.in, gdb-sim.in: Fix bug where it would not find anything diff --git a/sim-scripts/edb7312.in b/sim-scripts/edb7312.in index 20dbeac..252add5 100644 --- a/sim-scripts/edb7312.in +++ b/sim-scripts/edb7312.in @@ -42,4 +42,8 @@ mem_bank: map=I,type=RW, addr=0x80000000, size=0x00100000 mem_bank: map=M, type=RW, addr=0x00000000, size=0x1000000 uart: mod=pipe, desc_in=/dev/null, desc_out=/dev/stdout EOF + + if [ ${coverage} = yes ] ; then + echo "code_coverage: state=on, filename=${2}.cov, start=0x80000000, end=0x80100000" + fi } diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index 61134e6..fa61c19 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -128,6 +128,7 @@ test ${verbose} = "yes" && echo Using ${runBSP} ## These are faults any BSP may generate. They are common to RTEMS. checkGenericExits() { +set -x logfile=$1 ## Clean exit patterns -- delay for coverage to get written @@ -149,7 +150,9 @@ 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 else return 1 fi @@ -193,7 +196,7 @@ runtest() return fi - #echo run ${testname} for maximum ${max_run_time} seconds + echo run ${testname} for maximum ${max_run_time} seconds logfile=${testname}.tmp ${runBSP} `runARGS ${testname}` >${logfile} 2>&1 & pid=$! @@ -223,7 +226,7 @@ runtest() checkBSPFaults ${logfile} >/dev/null 2>&1 bspFaults=$? # check for cross platform messages which indicate program ended - checkGenericExits ${logfile} >/dev/null 2>&1 + checkGenericExits ${logfile} #>/dev/null 2>&1 genericExits=$? if [ ${bspFaults} -ne 0 -o ${genericExits} -ne 0 ] ; then kill -9 ${pid} >/dev/null 2>&1 @@ -239,6 +242,7 @@ runtest() fi done kill -9 $pid >/dev/null 2>&1 + rm ${logfile} } if [ "X${args}" = "X" ] ; then |