diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-05-24 17:30:57 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-05-27 15:56:40 +0200 |
commit | 9fd8f1b26406747f82913cf97034d9a4eb3d0a2e (patch) | |
tree | 76d3b3e6a50d6c43cf2b2e8b28f5b0a2c1cfda63 /mysql-test/mysql-test-run.pl | |
parent | e64dc07125c8143e27565947e71db76d597dfaf8 (diff) | |
download | mariadb-git-9fd8f1b26406747f82913cf97034d9a4eb3d0a2e.tar.gz |
mtr: update titlebar when the test ends, not when it starts
otherwise it reaches "0 tests left" state and then waits for
a few minutes for all workers to complete their tests.
show failures. account for retries.
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index d229390cbb5..29294590ae3 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -369,32 +369,6 @@ my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE}; select(STDOUT); $| = 1; # Automatically flush STDOUT -my $set_titlebar; - - - BEGIN { - if (IS_WINDOWS) { - my $have_win32_console= 0; - eval { - require Win32::Console; - Win32::Console->import(); - $have_win32_console = 1; - }; - eval 'sub HAVE_WIN32_CONSOLE { $have_win32_console }'; - } else { - eval 'sub HAVE_WIN32_CONSOLE { 0 }'; - } -} - -if (-t STDOUT) { - if (IS_WINDOWS and HAVE_WIN32_CONSOLE) { - $set_titlebar = sub {Win32::Console::Title $_[0];}; - } elsif (defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) { - $set_titlebar = sub { syswrite STDOUT, "\e];$_[0]\a"; }; - } -} - - main(); sub have_wsrep() { @@ -632,7 +606,7 @@ sub main { } ####################################################################### - my $num_tests= @$tests; + my $num_tests= $mtr_report::tests_total= @$tests; if ( $opt_parallel eq "auto" ) { # Try to find a suitable value for number of workers if (IS_WINDOWS) @@ -1073,8 +1047,6 @@ sub run_test_server ($$$) { delete $next->{reserved}; } - titlebar_stat(scalar(@$tests)) if $set_titlebar; - if ($next) { # We don't need this any more delete $next->{criteria}; @@ -6666,23 +6638,3 @@ sub list_options ($) { exit(1); } - -sub time_format($) { - sprintf '%d:%02d:%02d', $_[0]/3600, ($_[0]/60)%60, $_[0]%60; -} - -our $num_tests; - -sub titlebar_stat { - my ($left) = @_; - - # 2.5 -> best by test - $num_tests = $left + 2.5 unless $num_tests; - - my $done = $num_tests - $left; - my $spent = time - $^T; - - &$set_titlebar(sprintf "mtr: spent %s on %d tests. %s (%d tests) left", - time_format($spent), $done, - time_format($spent/$done * $left), $left); -} |