aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2008-11-18 22:00:42 +0000
committerBen Elliston <bje@gcc.gnu.org>2008-11-19 09:00:42 +1100
commit7a401a0df37dd6d55bf20b75ddf977f1b14c98f7 (patch)
tree61fd45f381586b6a852cabfcd59833cc22229849 /contrib
parent8afb060511297809fdd2a8453f2919d57fc5d53d (diff)
downloadgcc-7a401a0df37dd6d55bf20b75ddf977f1b14c98f7.zip
gcc-7a401a0df37dd6d55bf20b75ddf977f1b14c98f7.tar.gz
gcc-7a401a0df37dd6d55bf20b75ddf977f1b14c98f7.tar.bz2
dg-cmp-results.sh: Do not print usage if either .sum file cannot be opened...
* dg-cmp-results.sh: Do not print usage if either .sum file cannot be opened; print a more meaningful error instead. From-SVN: r141979
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog5
-rwxr-xr-xcontrib/dg-cmp-results.sh14
2 files changed, 17 insertions, 2 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 5bdf4a2..4f49364 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-18 Ben Elliston <bje@au.ibm.com>
+
+ * dg-cmp-results.sh: Do not print usage if either .sum file cannot
+ be opened; print a more meaningful error instead.
+
2008-10-24 Janis Johnson <janis187@us.ibm.com>
Jakub Jelinek <jakub@redhat.com>
diff --git a/contrib/dg-cmp-results.sh b/contrib/dg-cmp-results.sh
index 753005d..d291769 100755
--- a/contrib/dg-cmp-results.sh
+++ b/contrib/dg-cmp-results.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2006 Free Software Foundation
+# Copyright (C) 2006, 2008 Free Software Foundation
#
# Analyze changes in GCC DejaGNU test logs for binutils, gcc, gdb, etc.
# Original version written in 2005 by James Lemke <jwlemke@wasabisystems.com>.
@@ -27,11 +27,21 @@ while test "$1" = "-v"; do
shift
done
-if test $# -ne 3 -o ! -f "$2" -o ! -f "$3"; then
+if test $# -ne 3 ; then
usage
exit 1
fi
+if test ! -f "$2"; then
+ echo "unable to open $2" >&2
+ exit 1
+fi
+
+if test ! -f "$3"; then
+ echo "unable to open $3" >&2
+ exit 1
+fi
+
# Command differences for various platforms.
case `uname -s` in
Darwin|NetBSD)