aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/ktest/ktest.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index b9cd036f0442..27273c228d92 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1534,10 +1534,14 @@ sub fail {
1534 1534
1535sub run_command { 1535sub run_command {
1536 my ($command, $redirect) = @_; 1536 my ($command, $redirect) = @_;
1537 my $start_time;
1538 my $end_time;
1537 my $dolog = 0; 1539 my $dolog = 0;
1538 my $dord = 0; 1540 my $dord = 0;
1539 my $pid; 1541 my $pid;
1540 1542
1543 $start_time = time;
1544
1541 $command =~ s/\$SSH_USER/$ssh_user/g; 1545 $command =~ s/\$SSH_USER/$ssh_user/g;
1542 $command =~ s/\$MACHINE/$machine/g; 1546 $command =~ s/\$MACHINE/$machine/g;
1543 1547
@@ -1570,6 +1574,15 @@ sub run_command {
1570 close(LOG) if ($dolog); 1574 close(LOG) if ($dolog);
1571 close(RD) if ($dord); 1575 close(RD) if ($dord);
1572 1576
1577 $end_time = time;
1578 my $delta = $end_time - $start_time;
1579
1580 if ($delta == 1) {
1581 doprint "[1 second] ";
1582 } else {
1583 doprint "[$delta seconds] ";
1584 }
1585
1573 if ($failed) { 1586 if ($failed) {
1574 doprint "FAILED!\n"; 1587 doprint "FAILED!\n";
1575 } else { 1588 } else {