X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=tools%2Ftesting%2Fktest%2Fktest.pl;h=1dae000f79f87ef36ffd507b851ba4e2dc4df0af;hb=988427829bcd230c78106d28dbfa85d45d182909;hp=b9cd036f0442e8c0e9814119fd458ffef2c166ed;hpb=eb64c3c6cdb8fa8a4d324eb71a9033b62e150918;p=karo-tx-linux.git diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index b9cd036f0442..1dae000f79f8 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -178,6 +178,7 @@ my $checkout; my $localversion; my $iteration = 0; my $successes = 0; +my $stty; my $bisect_good; my $bisect_bad; @@ -1349,6 +1350,9 @@ sub open_console { my $flags; + # save terminal settings + $stty = `stty -g`; + my $pid = open($fp, "$console|") or dodie "Can't open console $console"; @@ -1368,6 +1372,9 @@ sub close_console { print "closing!\n"; close($fp); + + # restore terminal settings + system("stty $stty"); } sub start_monitor { @@ -1534,10 +1541,14 @@ sub fail { sub run_command { my ($command, $redirect) = @_; + my $start_time; + my $end_time; my $dolog = 0; my $dord = 0; my $pid; + $start_time = time; + $command =~ s/\$SSH_USER/$ssh_user/g; $command =~ s/\$MACHINE/$machine/g; @@ -1570,6 +1581,15 @@ sub run_command { close(LOG) if ($dolog); close(RD) if ($dord); + $end_time = time; + my $delta = $end_time - $start_time; + + if ($delta == 1) { + doprint "[1 second] "; + } else { + doprint "[$delta seconds] "; + } + if ($failed) { doprint "FAILED!\n"; } else {