+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
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;
}
}