From 59f43d2b58271c4beeab14104014dcd1ae059997 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 29 Sep 2007 08:57:02 +0000 Subject: r25427: fix SELFTEST RUNTIME calculation for the build-farm metze (This used to be commit 554d56aa16c147bbb383e4a40d7fc11fa405a3a8) --- source4/selftest/output/buildfarm.pm | 9 +++++---- source4/selftest/output/plain.pm | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/selftest') diff --git a/source4/selftest/output/buildfarm.pm b/source4/selftest/output/buildfarm.pm index 953f009c7d..cf30bce6c8 100644 --- a/source4/selftest/output/buildfarm.pm +++ b/source4/selftest/output/buildfarm.pm @@ -7,10 +7,10 @@ use Exporter; use strict; -sub new($$) { - my ($class) = @_; +sub new($$$$) { + my ($class, $verbose, $immediate, $statistics) = @_; my $self = { - start => time(), + statistics => $statistics, test_output => {} }; bless($self, $class); @@ -21,11 +21,12 @@ sub start_testsuite($$) my ($self, $state) = @_; my $out = ""; + my $duration = $state->{START_TIME} - $self->{statistics}->{START_TIME}; $out .= "--==--==--==--==--==--==--==--==--==--==--\n"; $out .= "Running test $state->{NAME} (level 0 stdout)\n"; $out .= "--==--==--==--==--==--==--==--==--==--==--\n"; $out .= scalar(localtime())."\n"; - $out .= "SELFTEST RUNTIME: " . ($state->{START_TIME} - $self->{START_TIME}) . "s\n"; + $out .= "SELFTEST RUNTIME: " . $duration . "s\n"; $out .= "NAME: $state->{NAME}\n"; $out .= "CMD: $state->{CMD}\n"; diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm index d52c4846c0..12236e518f 100644 --- a/source4/selftest/output/plain.pm +++ b/source4/selftest/output/plain.pm @@ -13,8 +13,7 @@ sub new($$$$) { immediate => $immediate, statistics => $statistics, test_output => {}, - suitesfailed => [], - start => time() + suitesfailed => [] }; bless($self, $class); } -- cgit