mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Regtest: add time cost statistics
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>
This commit is contained in:
parent
16be0ca4ba
commit
f7ddfc7cfd
@ -641,6 +641,7 @@ sub test_one_dir($$)
|
||||
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";
|
||||
}
|
||||
@ -652,7 +653,11 @@ sub test_one_dir($$)
|
||||
}
|
||||
}
|
||||
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("..");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user