diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-22 11:30:34 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-22 17:48:23 -0700 |
commit | 31d5ac05402ed9ac8158d143283c7f8b2d7bb7b4 (patch) | |
tree | 072359171a72ba718c0298232e83e45157b25809 /selftest/Subunit.pm | |
parent | 54f0da368f35ce7d7fd4b093b865ffea284d826b (diff) | |
download | samba-31d5ac05402ed9ac8158d143283c7f8b2d7bb7b4.tar.gz |
selftest: Let tests add prefix to tests by themselve.
Diffstat (limited to 'selftest/Subunit.pm')
-rw-r--r-- | selftest/Subunit.pm | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index a94eecd7e4b..1cc0e721696 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -19,42 +19,9 @@ use POSIX; require Exporter; @ISA = qw(Exporter); -@EXPORT_OK = qw(filter_add_prefix); use strict; -sub filter_add_prefix($$) -{ - my ($prefix, $fh) = @_; - - while(<$fh>) { - if (/^test: (.+)\n/) { - Subunit::start_test($prefix.$1); - } elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail): (.*?)( \[)?([ \t]*)( multipart)?\n/) { - my $result = $1; - my $testname = $prefix.$2; - my $reason = undef; - if ($3) { - $reason = ""; - # reason may be specified in next lines - my $terminated = 0; - while(<$fh>) { - if ($_ eq "]\n") { $terminated = 1; last; } else { $reason .= $_; } - } - - unless ($terminated) { - print $reason; - $reason = "reason ($result) interrupted"; - $result = "error"; - } - } - Subunit::end_test($testname, $result, $reason); - } else { - print $_; - } - } -} - sub start_test($) { my ($testname) = @_; |