[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.5-8-g3546628



The following commit has been merged in the master branch:
commit 3546628691e4fe203a30a2d5496a47046c8e6b83
Author: Niels Thykier <niels@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 <niels@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


Reply to: