2 # Pretty-format subunit output
3 # Copyright (C) Jelmer Vernooij <jelmer@samba.org>
4 # Published under the GNU GPL, v3 or later
10 format-subunit [--immediate] < instream > outstream
14 Format the output of a subunit stream.
22 Show errors as soon as they happen rather than at the end of the test run.
26 GNU General Public License, version 3 or later.
30 Jelmer Vernooij <jelmer@samba.org>
36 use FindBin qw($RealBin $Script);
38 use Subunit qw(parse_results);
42 my $opt_immediate = 0;
45 my $result = GetOptions (
46 'help|h|?' => \$opt_help,
47 'verbose' => \$opt_verbose,
48 'immediate' => \$opt_immediate,
49 'prefix:s' => \$opt_prefix,
52 exit(1) if (not $result);
56 # we want unbuffered output
62 TESTS_UNEXPECTED_OK => 0,
63 TESTS_EXPECTED_OK => 0,
64 TESTS_UNEXPECTED_FAIL => 0,
65 TESTS_EXPECTED_FAIL => 0,
70 require output::plain;
71 $msg_ops = new output::plain("$opt_prefix/summary", $opt_verbose, $opt_immediate, $statistics, undef);
73 my $expected_ret = parse_results($msg_ops, $statistics, *STDIN);