|
From: <sv...@va...> - 2009-02-25 04:58:01
|
Author: njn
Date: 2009-02-25 04:57:56 +0000 (Wed, 25 Feb 2009)
New Revision: 9263
Log:
Use 'diff -u' for regtests if it's supported, its output it much easier to
read than plain 'diff'.
Modified:
trunk/configure.in
trunk/tests/vg_regtest.in
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-02-25 04:44:45 UTC (rev 9262)
+++ trunk/configure.in 2009-02-25 04:57:56 UTC (rev 9263)
@@ -114,6 +114,23 @@
esac
+# Check if 'diff' supports -u (universal diffs) and use it if possible.
+
+AC_MSG_CHECKING([for diff -u])
+AC_SUBST(DIFF)
+
+# Comparing two identical files results in 0, unless -u isn't supported (as
+# it's not on AIX).
+touch tmp-xxx;
+if diff -u tmp-xxx tmp-xxx ; then
+ AC_MSG_RESULT([yes])
+ DIFF="diff -u"
+else
+ AC_MSG_RESULT([no])
+ DIFF="diff"
+fi
+
+
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
Modified: trunk/tests/vg_regtest.in
===================================================================
--- trunk/tests/vg_regtest.in 2009-02-25 04:44:45 UTC (rev 9262)
+++ trunk/tests/vg_regtest.in 2009-02-25 04:57:56 UTC (rev 9263)
@@ -277,7 +277,7 @@
($f_exp eq "/dev/null") or die "Unexpected .exp file: $f_exp\n";
}
- mysystem("diff $f_exp $name.$mid.out > $name.$mid.diff$n");
+ mysystem("@DIFF@ $f_exp $name.$mid.out > $name.$mid.diff$n");
if (not -s "$name.$mid.diff$n") {
# A match; remove .out and any previously created .diff files.
|