subunit: Support the time: command.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 3 Jun 2009 15:39:54 +0000 (17:39 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 11 Jun 2009 17:59:57 +0000 (19:59 +0200)
selftest/Subunit.pm

index 19af636d0bacbaf71e21d4528c3f6024cf1857ba..fc1a3d1d97d51fcb80c58c03b8c0c4fc5960316d 100644 (file)
@@ -15,6 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package Subunit;
+use POSIX;
 
 require Exporter;
 @ISA = qw(Exporter);
@@ -36,6 +37,8 @@ sub parse_results($$$$$)
                        $msg_ops->control_msg($_);
                        $msg_ops->start_test($open_tests, $1);
                        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 (/^(success|successful|failure|skip|knownfail|error): (.*?)( \[)?([ \t]*)\n/) {
                        $msg_ops->control_msg($_);
                        my $reason = undef;