GNU/Linux (specifically, the GNU part), FreeBSD, NetBSD, OpenBSD,
illumos and even Solaris 9 and AIX 7.1 all have a diff that supports
"-u" for unified output format. Let that be the default to make test
failures more intelligible for humans. The old behaviour is available
with "DIFF_FLAGS= make check".
RPKI-Router: Refine length and bounds checks.
Building and testing:
Treat "msys" as Windows for test exit statuses.
+ Use unified diff by default.
TBD
Summary for 4.99.2 tcpdump release: (so far)
mkpath($diffdir);
my $origdir = getcwd();
my $srcdir = $ENV{'srcdir'} || ".";
+# Default to unified diff and allow to fall back to basic diff if necessary.
+my $diff_flags = defined $ENV{'DIFF_FLAGS'} ? $ENV{'DIFF_FLAGS'} : '-u';
#
# Force UTC, so time stamps are printed in a standard time zone, and
$r = system "fc /lb1000 /t /1 $winoutput tests\\NEW\\$outputbase >tests\\DIFF\\$outputbase.diff";
$diffstat = $r >> 8;
} else {
- $r = system "diff $output tests/NEW/$outputbase >tests/DIFF/$outputbase.diff";
+ $r = system "diff $diff_flags $output tests/NEW/$outputbase >tests/DIFF/$outputbase.diff";
$diffstat = WEXITSTATUS($r);
}
}