summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/torture/torture.c3
-rw-r--r--selftest/Subunit.pm12
-rwxr-xr-xselftest/selftest.pl7
3 files changed, 10 insertions, 12 deletions
diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 27b2bdcc93..0bf50ccbae 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -71,7 +71,7 @@ struct torture_context *torture_context_child(struct torture_context *parent)
subtorture->results = talloc_reference(subtorture, parent->results);
return subtorture;
-}
+}
/**
create a temporary directory.
@@ -343,7 +343,6 @@ static bool internal_torture_run_test(struct torture_context *context,
context->active_testname = talloc_asprintf(context, "%s-%s", old_testname, test->name);
}
-
context->active_tcase = tcase;
context->active_test = test;
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm
index a3a2113e4e..693de1550e 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()
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 00db9518cc..75110708cc 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -134,6 +134,13 @@ use Subunit qw(parse_results);
use Subunit::Filter;
use SocketWrapper;
+eval {
+require Time::HiRes;
+};
+unless ($@) {
+ use Time::HiRes qw(time);
+}
+
my $opt_help = 0;
my $opt_target = "samba4";
my $opt_quick = 0;