summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-03-21 16:01:39 +0100
committerunknown <kent@mysql.com>2005-03-21 16:01:39 +0100
commita94a62cefb4e2c25c0543a7a0741388d48b5e435 (patch)
treec92cb75948d95a265bea9281fe2b046293475243 /mysql-test/lib
parent8d29891138810d788848b02e317daba07e4c0d85 (diff)
downloadmariadb-git-a94a62cefb4e2c25c0543a7a0741388d48b5e435.tar.gz
mtr_report.pl:
Made --timer work mtr_cases.pl: Added option --reorder to get less server restarts mysql-test-run.pl: Added option --reorder to get less server restarts Moved do_before_start_master() not to remove binlog files unless restarted Made --timer work Slave was incorrectly writing log to error log mysql-test/mysql-test-run.pl: Added option --reorder to get less server restarts Moved do_before_start_master() not to remove binlog files unless restarted Made --timer work Slave was incorrectly writing log to error log mysql-test/lib/mtr_cases.pl: Added option --reorder to get less server restarts mysql-test/lib/mtr_report.pl: Made --timer work
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_cases.pl33
-rw-r--r--mysql-test/lib/mtr_report.pl11
2 files changed, 23 insertions, 21 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index 5977bb380cf..878afe95f2c 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -63,21 +63,24 @@ sub collect_test_cases ($) {
# To speed things up, we sort first in if the test require a restart
# or not, second in alphanumeric order.
-# @$cases = sort {
-# if ( $a->{'master_restart'} and $b->{'master_restart'} or
-# ! $a->{'master_restart'} and ! $b->{'master_restart'} )
-# {
-# return $a->{'name'} cmp $b->{'name'};
-# }
-# if ( $a->{'master_restart'} )
-# {
-# return 1; # Is greater
-# }
-# else
-# {
-# return -1; # Is less
-# }
-# } @$cases;
+ if ( $::opt_reorder )
+ {
+ @$cases = sort {
+ if ( $a->{'master_restart'} and $b->{'master_restart'} or
+ ! $a->{'master_restart'} and ! $b->{'master_restart'} )
+ {
+ return $a->{'name'} cmp $b->{'name'};
+ }
+ if ( $a->{'master_restart'} )
+ {
+ return 1; # Is greater
+ }
+ else
+ {
+ return -1; # Is less
+ }
+ } @$cases;
+ }
return $cases;
}
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index 9947fed9d27..fd665b154b8 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -89,12 +89,11 @@ sub mtr_report_test_passed ($) {
my $tinfo= shift;
my $timer= "";
-# FIXME
-# if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" )
-# {
-# $timer= `cat var/log/timer`;
-# $timer= sprintf "%13s", $timer;
-# }
+ if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" )
+ {
+ $timer= mtr_fromfile("$::glob_mysql_test_dir/var/log/timer");
+ $timer= sprintf "%12s", $timer;
+ }
$tinfo->{'result'}= 'MTR_RES_PASSED';
print "[ pass ] $timer\n";
}