diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-04 17:30:23 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 19:59:58 +0200 |
commit | c278ee50eeb59f74b960036803e3288c8b329c72 (patch) | |
tree | 14ad13be2d681ac30682f71d22914cf00e6b0015 /selftest/Subunit.pm | |
parent | 16a69f358a38c60577e25bc0811a220f8e71d2cd (diff) | |
download | samba-c278ee50eeb59f74b960036803e3288c8b329c72.tar.gz |
More work supporting prefixes.
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; |