summaryrefslogtreecommitdiff
path: root/contrib/compare_tests
diff options
context:
space:
mode:
authorqneill <qneill@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-15 20:58:40 +0000
committerqneill <qneill@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-15 20:58:40 +0000
commit839c4f221eb673b6fc22885b63edb2911c2064ea (patch)
treeebdfb3fcbe7261a24a848d24b8e4d9b6d105c513 /contrib/compare_tests
parent0559575c23d912c20499805589c7e8d3c2fbafe8 (diff)
downloadgcc-839c4f221eb673b6fc22885b63edb2911c2064ea.tar.gz
2012-02-15 Quentin Neill <quentin.neill@amd.com>
* compare_tests: Fix trailing paths in dir arguments. Handle sum1/sum2 temp files with others. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib/compare_tests')
-rwxr-xr-xcontrib/compare_tests11
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/compare_tests b/contrib/compare_tests
index eb17b323fec..2fc6e056fc6 100755
--- a/contrib/compare_tests
+++ b/contrib/compare_tests
@@ -43,7 +43,9 @@ lst2=/tmp/$tool-lst2.$$
lst3=/tmp/$tool-lst3.$$
lst4=/tmp/$tool-lst4.$$
lst5=/tmp/$tool-lst5.$$
-tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5"
+sum1=/tmp/$tool-sum1.$$
+sum2=/tmp/$tool-sum2.$$
+tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2"
[ "$1" = "-strict" ] && strict=$1 && shift
[ "$1" = "-?" ] && usage
@@ -60,8 +62,8 @@ if [ -d "$1" -a -d "$2" ] ; then
echo "## Dir2=$2: `cat $lst2 | wc -l` sum files"
echo
# remove leading directory components to compare
- sed -e "s|^$1/||" $lst1 | sort >$lst3
- sed -e "s|^$2/||" $lst2 | sort >$lst4
+ sed -e "s|^$1[/]*||" $lst1 | sort >$lst3
+ sed -e "s|^$2[/]*||" $lst2 | sort >$lst4
comm -23 $lst3 $lst4 >$lst5
if [ -s $lst5 ] ; then
echo "# Extra sum files in Dir1=$1"
@@ -83,14 +85,11 @@ if [ -d "$1" -a -d "$2" ] ; then
exit $exit_status
fi
cmnsums=`cat $lst5 | wc -l`
- sum1="/tmp/$tool-sum-1"
- sum2="/tmp/$tool-sum-2"
echo "# Comparing $cmnsums common sum files"
( for fname in `cat $lst5`; do cat $1/$fname; done ) >$sum1
( for fname in `cat $lst5`; do cat $2/$fname; done ) >$sum2
echo "## ${CONFIG_SHELL-/bin/sh} $0 $strict $sum1 $sum2"
${CONFIG_SHELL-/bin/sh} $0 $strict $sum1 $sum2
- rm -f $sum1 $sum2
ret=$?
if [ $ret -ne 0 ]; then
exit_status=`expr $exit_status + 1`