diff options
Diffstat (limited to 'selftest/Subunit.pm')
-rw-r--r-- | selftest/Subunit.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index 7feb5de9a4..ddecfe4369 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -1,5 +1,5 @@ -# Simple Perl module for parsing the Subunit protocol -# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org> +# Perl module for parsing and generating the Subunit protocol +# Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ sub parse_results($$$$) my $unexpected_ok = 0; my $expected_fail = 0; my $unexpected_fail = 0; + my $prefix = ""; my $unexpected_err = 0; my $orig_open_len = $#$open_tests; @@ -39,6 +40,8 @@ sub parse_results($$$$) push (@$open_tests, $1); } elsif (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)Z\n/) { $msg_ops->report_time(mktime($6, $5, $4, $3, $2, $1)); + } elsif (/^prefix: (.*)\n/) { + $prefix = $1; } elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail): (.*?)( \[)?([ \t]*)\n/) { $msg_ops->control_msg($_); my $result = $1; @@ -133,4 +136,10 @@ sub report_time($) printf "time: %04d-%02d-%02d %02d:%02d:%02dZ\n", $year+1900, $mon, $mday, $hour, $min, $sec; } +sub prefix($) +{ + my ($prefix) = @_; + print "prefix: $prefix\n"; +} + 1; |