]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tap driver: refactor and remove dead code
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 19:34:56 +0000 (21:34 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 19:34:56 +0000 (21:34 +0200)
* lib/tap-driver (get_tap_line): Removed, ...
(all callers): ... updated to use $parser->next directly instead.
(peek_tap_line, unget_tap_line, @tap_lines): Remove, they're not
used anymore.
(TAP_PEEKING): Block deleted, all its subroutines and variables
having been removed.

ChangeLog
lib/tap-driver

index 328ca844d91b3c7dc71dc337add846187b5c1621..86e565b493c0a54b6472a558f0cae2043f6df746 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-08-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tap driver: refactor and remove dead code
+       * lib/tap-driver (get_tap_line): Removed, ...
+       (all callers): ... updated to use $parser->next directly instead.
+       (peek_tap_line, unget_tap_line, @tap_lines): Remove, they're not
+       used anymore.
+       (TAP_PEEKING): Block deleted, all its subroutines and variables
+       having been removed.
+
 2011-08-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        testsuite: fix spurious failure in a test on TAP support
index 948c3d5b9bb93efac72c8c5d2ac0c27fc1232935..239334630370c5ddd28dea903dcc183b61445264 100755 (executable)
@@ -98,7 +98,6 @@ sub decorate_result ($);
 sub extract_tap_comment ($);
 sub finish ();
 sub get_global_test_result ();
-sub get_tap_line ();
 sub get_test_exit_message ();
 sub get_test_results ();
 sub handle_tap_bailout ($);
@@ -106,12 +105,10 @@ sub handle_tap_plan ($);
 sub handle_tap_test ($);
 sub main (@);
 sub must_recheck ();
-sub peek_tap_line ();
 sub report ($;$);
 sub start (@);
 sub stringify_test_result ($);
 sub testsuite_error ($);
-sub unget_tap_line ($);
 sub write_test_results ();
 sub yn ($);
 
@@ -143,29 +140,6 @@ sub yn ($)
   return $bool ? "yes" : "no";
 }
 
-TAP_PEEKING :
-{
-  my @tap_lines = ();
-
-  sub get_tap_line ()
-  {
-    @tap_lines > 0 ? pop @tap_lines : $parser->next;
-  }
-
-  sub unget_tap_line ($)
-  {
-    push @tap_lines, @_;
-  }
-
-  sub peek_tap_line ()
-  {
-    my $res = get_tap_line;
-    unget_tap_line ($res);
-    return $res;
-  }
-
-}
-
 TEST_RESULTS :
 {
   my (@test_results, %test_results);
@@ -238,7 +212,7 @@ sub get_test_exit_message ()
 {
   # Flush all the remaining TAP stream, so that we can obtain the
   # exit status of the TAP producer.
-  do {} while defined get_tap_line ();
+  do {} while defined $parser->next;
   my $wstatus = $parser->wait;
   # Return an undefined value if the producer exited with success.
   return unless $wstatus;
@@ -432,7 +406,7 @@ sub main (@)
 {
   start @_;
 
-  while (defined (my $cur = get_tap_line))
+  while (defined (my $cur = $parser->next))
     {
       # Verbatim copy any input line into the log file.
       print $cur->raw . "\n";