diff options
Diffstat (limited to 'compare_tests')
-rwxr-xr-x | compare_tests | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/compare_tests b/compare_tests index d98f7fe..39f74a3 100755 --- a/compare_tests +++ b/compare_tests @@ -13,7 +13,7 @@ usage() echo >&2 fi cat >&2 <<EOUSAGE -Usage: $0 [-target target-triplet] PREVIOUS CURRENT +Usage: $0 [-target target-triplet] [-pass-thresh pass-ratio-threshold] PREVIOUS CURRENT Compare the PREVIOUS and CURRENT test case .sum files, reporting anything of interest. @@ -23,6 +23,9 @@ Compare the PREVIOUS and CURRENT test case .sum files, reporting anything of int -target enables to provide the target name to use when parsing the file containing the list of unstable tests. + -pass-thresh controls the level of warning when too few tests + pass. + Exit with the following values: 0 if there is nothing of interest 1 if there are improvements @@ -54,8 +57,29 @@ sum1=/tmp/$tool-sum1.$$ sum2=/tmp/$tool-sum2.$$ tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2" -[ "$1" = "-target" ] && target=$2 && shift 2 -[ "$1" = "-?" ] && usage +while [ $# -gt 2 ] +do + case "$1" in + "-target") + target=$2 + shift 2 + ;; + "-pass-thresh") + pass_thresh=$2 + shift 2 + ;; + "-?") + usage + ;; + *) + if [ $# -gt 2 ]; then + echo "ERROR: Too many arguments: $@" + usage + fi + ;; + esac +done + [ "$2" = "" ] && usage "Must specify both PREVIOUS and CURRENT" trap "rm -f $tmps" 0 1 2 3 5 9 13 15 @@ -113,7 +137,7 @@ if [ -d "$1" -a -d "$2" ] ; then unstable_target="$unstable_target --unstable-marker $board" fi done - ${CONFIG_SHELL-/usr/bin/perl} ${my_path}/compare_dg_tests.pl -l --unstable-test=${my_path}/unstable-tests.txt ${unstable_target} $sum1 $sum2 + ${CONFIG_SHELL-/usr/bin/perl} ${my_path}/compare_dg_tests.pl ${pass_thresh:+-pass-thresh=${pass_thresh}} -l --unstable-test=${my_path}/unstable-tests.txt ${unstable_target} $sum1 $sum2 ret=$? case $ret in 2) |