summaryrefslogtreecommitdiff
path: root/selftest/output/html.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-05-13 19:57:58 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-06-03 16:26:30 +0200
commit641f8d62df2d7ba0e80f3c8d78c3f8185dcf7048 (patch)
tree2ff45a1c31a742f485af7843cb7923f59e819434 /selftest/output/html.pm
parent53aeb7f4cf4935fbf48d745e6f38a9793120c1a9 (diff)
downloadsamba-641f8d62df2d7ba0e80f3c8d78c3f8185dcf7048.tar.gz
samba-641f8d62df2d7ba0e80f3c8d78c3f8185dcf7048.tar.bz2
samba-641f8d62df2d7ba0e80f3c8d78c3f8185dcf7048.zip
Support reporting current time in selftest output.
Diffstat (limited to 'selftest/output/html.pm')
-rw-r--r--selftest/output/html.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/selftest/output/html.pm b/selftest/output/html.pm
index e490765d06..d4d8204ea8 100644
--- a/selftest/output/html.pm
+++ b/selftest/output/html.pm
@@ -138,7 +138,7 @@ sub end_testsuite($$$$)
print TEST "</table>\n";
- print TEST "<div class=\"duration\">Duration: " . (time() - $self->{START_TIME}) . "s</div>\n";
+ print TEST "<div class=\"duration\">Duration: " . ($self->{last_time} - $self->{START_TIME}) . "s</div>\n";
$self->print_html_footer(*TEST);
@@ -192,12 +192,18 @@ sub end_testsuite($$$$)
print INDEX "</tr>\n";
}
+sub report_time($$)
+{
+ my ($self, $time) = @_;
+ $self->{last_time} = $time;
+}
+
sub start_test($$)
{
my ($self, $parents, $testname) = @_;
if ($#$parents == -1) {
- $self->{START_TIME} = time();
+ $self->{START_TIME} = $self->{last_time};
$self->start_testsuite($testname);
return;
}