diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-13 23:22:35 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-14 10:54:27 +0200 |
commit | 49411fa1079fc78cba4751d57a3c76096fc1b772 (patch) | |
tree | fd76af8f43ebf21ad138b9aa0f41f64a9ea4a77f /selftest/Subunit.pm | |
parent | 9f3a43c0182b8b13b2f4ff615b5aca816f4f05b3 (diff) | |
download | samba-49411fa1079fc78cba4751d57a3c76096fc1b772.tar.gz |
subunit.pm: Pass through milliseconds in time reports.
Diffstat (limited to 'selftest/Subunit.pm')
-rw-r--r-- | selftest/Subunit.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index a3a2113e4eb..693de1550ec 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -23,13 +23,6 @@ require Exporter; use strict; -eval { -require Time::HiRes; -}; -unless ($@) { - use Time::HiRes qw(time); -} - sub parse_results($$$) { my ($msg_ops, $statistics, $fh) = @_; @@ -41,8 +34,6 @@ sub parse_results($$$) $msg_ops->control_msg($_); $msg_ops->start_test($1); push (@$open_tests, $1); - } elsif (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)\n/) { - $msg_ops->report_time(mktime($6, $5, $4, $3, $2-1, $1-1900)); } elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail|skip-testsuite|testsuite-failure|testsuite-xfail|testsuite-success|testsuite-error): (.*?)( \[)?([ \t]*)( multipart)?\n/) { $msg_ops->control_msg($_); my $result = $1; @@ -179,7 +170,8 @@ sub report_time($) { my ($time) = @_; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); - printf "time: %04d-%02d-%02d %02d:%02d:%02d\n", $year+1900, $mon+1, $mday, $hour, $min, $sec; + $sec = ($time - int($time) + $sec); + printf "time: %04d-%02d-%02d %02d:%02d:%02f\n", $year+1900, $mon+1, $mday, $hour, $min, $sec; } sub progress_pop() |