The following commit has been merged in the master branch:
commit 3546628691e4fe203a30a2d5496a47046c8e6b83
Author: Niels Thykier <ni...@thykier.net>
Date:   Mon Mar 5 13:33:39 2012 +0100

    t/runtests: Better error messages if Lintian fails to start
    
    Signed-off-by: Niels Thykier <ni...@thykier.net>

diff --git a/t/runtests b/t/runtests
index a36ac43..aadfd4f 100755
--- a/t/runtests
+++ b/t/runtests
@@ -462,18 +462,18 @@ sub run_lintian {
         my @data = <$in>;
         close $in;
         $status = ($? >> 8) & 255;
-        @data = sort @data if $testdata->{sort};
-        open my $fd, '>', $out or fail "opening $out: $!";
-        print $fd $_ for @data;
-        close $fd or fail "closing $out: $!";
+        unless ($status == 0 or $status == 1) {
+            msg_print "FAILED\n";
+            msg_print @data;
+            fail "$LINTIAN @options $file exited with status $status";
+        } else {
+            @data = sort @data if $testdata->{sort};
+            open my $fd, '>', $out or fail "opening $out: $!";
+            print $fd $_ for @data;
+            close $fd or fail "closing $out: $!";
+        }
     } else {
-        # Set it to 255 so it fails below
-        $status = 255;
-    }
-
-    unless ($status == 0 or $status == 1) {
-        msg_print "FAILED:\n";
-        fail("$LINTIAN @options $file exited with status $status\n");
+        fail ("pipe+fork: $!");
     }
     return 1;
 }
@@ -630,7 +630,7 @@ sub _check_result {
             msg_print "TODO\n";
             return 1;
         } else {
-            msg_print "FAILED:\n";
+            msg_print "FAILED\n";
             runsystem_ok('diff', '-u', $expected, $actual);
             return;
         }

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1s4z85-0004xl...@vasks.debian.org

Reply via email to