]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tap driver: a preparatory refactoring (1)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 6 Aug 2011 18:48:09 +0000 (20:48 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 6 Aug 2011 18:48:09 +0000 (20:48 +0200)
* lib/tap-driver (finish): Do not flush the TAP stream nor
fetch the exit status of the TAP producer if running with
the `--ignore-exit' option.  Obviously, don't try to write
such exit status in the test log anymore.

ChangeLog
lib/tap-driver

index 76ca19fd45a48edccf78349d4e1ed79a79c9ab36..033daec62a70bfa45f12f911f16fc818632421c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tap driver: a preparatory refactoring (1)
+       * lib/tap-driver (finish): Do not flush the TAP stream nor
+       fetch the exit status of the TAP producer if running with
+       the `--ignore-exit' option.  Obviously, don't try to write
+       such exit status in the test log anymore.
+
 2011-08-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        cosmetics: typofix in the name of a function in the TAP driver
index 508f5b3177bd797f3cf0e239cfab35e415ad2bac..a8743202fb80dad9b12cb693498b84096a0408ee 100755 (executable)
@@ -232,21 +232,16 @@ sub start (@)
 
 sub finish ()
 {
-  # Flush all the remaining TAP stream, so that we can obtain the
-  # exit status of the TAP producer.
-  do {} while defined get_tap_line ();
-  # TODO: we should probably use $parser->wait here, to catch signals too
-  if ($parser->exit != 0)
+  if (!$cfg{"ignore-exit"})
     {
-      my $msg = sprintf "exited with status %d", $parser->exit;
-      if ($cfg{"ignore-exit"})
-        {
-          # Log the exit status of the script anyway, even if it is not
-          # considered to be an error, to help debugging.
-          print "INFO: $test_script_name - $msg\n";
-        }
-      else
+      # Flush all the remaining TAP stream, so that we can obtain the
+      # exit status of the TAP producer.
+      do {} while defined get_tap_line ();
+      # TODO: we should probably use $parser->wait here, to catch
+      # TODO: signals too
+      if ($parser->exit != 0)
         {
+          my $msg = sprintf "exited with status %d", $parser->exit;
           testsuite_error $msg;
         }
     }