URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [contrib/] [compare_tests] - Rev 281
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/sh# This script automatically test the given tool with the tool's test cases,# reporting anything of interest.# exits with 0 if there is nothing of interest# exits with 1 if there is something interesting# exits with 2 if an error occurred# Give two .sum files to compare them# Written by Mike Stump <mrs@cygnus.com>tool=gxxtmp1=/tmp/$tool-testing.$$atmp2=/tmp/$tool-testing.$$bnow_s=/tmp/$tool-testing.$$dbefore_s=/tmp/$tool-testing.$$eif [ "$2" = "" ]; thenecho "Usage: $0 previous current" >&2exit 2fised 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' >$tmp1sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' >$tmp2before=$tmp1now=$tmp2exit_status=0trap "rm -f $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15if sort -k 2 </dev/null >/dev/null 2>&1; thenskip1='-k 2'elseskip1='+1'fisort -t ':' $skip1 "$now" > "$now_s"sort -t ':' $skip1 "$before" > "$before_s"grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "Tests that now fail, but worked before:"echocat $tmp2echoexit_status=1figrep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "Tests that now work, but didn't before:"echocat $tmp2echofigrep '^FAIL' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "New tests that FAIL:"echocat $tmp2echoexit_status=1figrep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "New tests that PASS:"echocat $tmp2echofigrep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "Old tests that passed, that have disappeared: (Eeek!)"echocat $tmp2echofigrep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2grep -s . $tmp2 >/dev/nullif [ $? = 0 ]; thenecho "Old tests that failed, that have disappeared: (Eeek!)"echocat $tmp2echofiexit $exit_status
Go to most recent revision | Compare with Previous | Blame | View Log
