automake-patches
[Top][All Lists]
Advanced

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

[PATCH 1/3] tap driver: a preparatory refactoring (1)


From: Stefano Lattarini
Subject: [PATCH 1/3] tap driver: a preparatory refactoring (1)
Date: Sat, 6 Aug 2011 21:47:26 +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      |    8 ++++++++
 lib/tap-driver |   21 ++++++++-------------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 76ca19f..033daec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-08-06  Stefano Lattarini  <address@hidden>
 
+       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  <address@hidden>
+
        cosmetics: typofix in the name of a function in the TAP driver
        * lib/tap-driver (testuite_error): Renamed ...
        (testsuite_error): ... to this, and minor related reformatting.
diff --git a/lib/tap-driver b/lib/tap-driver
index 508f5b3..a874320 100755
--- a/lib/tap-driver
+++ b/lib/tap-driver
@@ -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;
         }
     }
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]