Add running time of each (sub) directory in seconds
https://bugs.kde.org/show_bug.cgi?id=467036
Contributed-by: Jojo R <rjiejie@linux.alibaba.com>
my @fs = glob "*";
my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
+ my $tests_start_time = time;
if ($found_tests) {
print "-- Running tests in $full_dir $dashes\n";
}
}
}
if ($found_tests) {
- print "-- Finished tests in $full_dir $dashes\n";
+ my $tests_cost_time = time - $tests_start_time;
+ my $end_time = "(in $tests_cost_time sec)";
+ my $end_dashes = "-" x (50 - (length $full_dir)
+ - (length $end_time) - 1);
+ print "-- Finished tests in $full_dir $end_time $end_dashes\n";
}
chdir("..");