]> granicus.if.org Git - postgis/commitdiff
Take stderr noise from diff as failure. Fixes false negatives (#2505)
authorSandro Santilli <strk@keybit.net>
Thu, 10 Oct 2013 15:20:21 +0000 (15:20 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 10 Oct 2013 15:20:21 +0000 (15:20 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12028 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index 23652045880f454ff9a7394dbba7ca1fa01cb316..bf59ef4ce60b88405863fcb76813c87e96fd6fec 100755 (executable)
@@ -1282,12 +1282,12 @@ sub diff
        my $diffstr = '';
 
        if ( $sysdiff ) {
-               $diffstr = `diff --strip-trailing-cr -u $expected_file $obtained_file`;
+               $diffstr = `diff --strip-trailing-cr -u $expected_file $obtained_file 2>&1`;
                return $diffstr;
        }
 
-       open(OBT, $obtained_file) || die "Cannot open $obtained_file\n";
-       open(EXP, $expected_file) || die "Cannot open $expected_file\n";
+       open(OBT, $obtained_file) || return "Cannot open $obtained_file\n";
+       open(EXP, $expected_file) || return "Cannot open $expected_file\n";
        my $lineno = 0;
        while (!eof(OBT) or !eof(EXP)) {
                # TODO: check for premature end of one or the other ?