Commit 044f9e82 authored by unknown's avatar unknown

mysql-test-run.pl:

  Let --start-and-exit actually start a server
  Added that test case names can be specified on the comman line
  Added embedded server support
  Added environment variables UMASK, UMASK_DIR
  Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER
  Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST
  Pass on return value from sleep_until_file_created(), to fail test
  Fail test if early termination of mysqld servers
  Create intial databases for the second master, and two additional slaves
mtr_process.pl:
  Find out if port is still in use, using simple TCP connect
  Use non blocking waitpid() to catch terminations early
  Make a special case spawning the 'mysqltest' application
  Redo the fork() if it returns EAGAIN
  Make sure to record if master or slave terminated
  Improved debugging output
  Improved code that remove PID files to avoid race
  Abort if we can't stop all mysqld servers using our ports
  Many improvements in killing mysqld servers
  Let sleep_until_file_created() catch if server died early
mtr_report.pl:
  Added option to disable test cases using <testcase>.disabled file
  If --timer, only try to open file with time data if it exists
mtr_io.pl:
  Remove starting/ending space reading server options from file


mysql-test/lib/mtr_io.pl:
  Remove starting/ending space reading server options from file
mysql-test/lib/mtr_report.pl:
  Added option to disable test cases using <testcase>.disabled file
  If --timer, only try to open file with time data if it exists
mysql-test/lib/mtr_process.pl:
  Find out if port is still in use, using simple TCP connect
  Use non blocking waitpid() to catch terminations early
  Make a special case spawning the 'mysqltest' application
  Redo the fork() if it returns EAGAIN
  Make sure to record if master or slave terminated
  Improved debugging output
  Improved code that remove PID files to avoid race
  Abort if we can't stop all mysqld servers using our ports
  Many improvements in killing mysqld servers
  Let sleep_until_file_created() catch if server died early
mysql-test/mysql-test-run.pl:
  Let --start-and-exit actually start a server
  Added that test case names can be specified on the comman line
  Added embedded server support
  Added environment variables UMASK, UMASK_DIR
  Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER
  Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST
  Pass on return value from sleep_until_file_created(), to fail test
  Fail test if early termination of mysqld servers
  Create intial databases for the second master, and two additional slaves
parent e244a3a9
...@@ -8,6 +8,7 @@ use strict; ...@@ -8,6 +8,7 @@ use strict;
sub mtr_get_pid_from_file ($); sub mtr_get_pid_from_file ($);
sub mtr_get_opts_from_file ($); sub mtr_get_opts_from_file ($);
sub mtr_fromfile ($);
sub mtr_tofile ($@); sub mtr_tofile ($@);
sub mtr_tonewfile($@); sub mtr_tonewfile($@);
...@@ -107,6 +108,8 @@ sub mtr_fromfile ($) { ...@@ -107,6 +108,8 @@ sub mtr_fromfile ($) {
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!"); open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
my $text= join('', <FILE>); my $text= join('', <FILE>);
close FILE; close FILE;
$text =~ s/^\s+//; # Remove starting space, incl newlines
$text =~ s/\s+$//; # Remove ending space, incl newlines
return $text; return $text;
} }
......
This diff is collapsed.
...@@ -10,6 +10,7 @@ sub mtr_report_test_name($); ...@@ -10,6 +10,7 @@ sub mtr_report_test_name($);
sub mtr_report_test_passed($); sub mtr_report_test_passed($);
sub mtr_report_test_failed($); sub mtr_report_test_failed($);
sub mtr_report_test_skipped($); sub mtr_report_test_skipped($);
sub mtr_report_test_disabled($);
sub mtr_show_failed_diff ($); sub mtr_show_failed_diff ($);
sub mtr_report_stats ($); sub mtr_report_stats ($);
...@@ -72,7 +73,14 @@ sub mtr_report_test_skipped ($) { ...@@ -72,7 +73,14 @@ sub mtr_report_test_skipped ($) {
my $tinfo= shift; my $tinfo= shift;
$tinfo->{'result'}= 'MTR_RES_SKIPPED'; $tinfo->{'result'}= 'MTR_RES_SKIPPED';
if ( $tinfo->{'disable'} )
{
print "[ disabled ] $tinfo->{'comment'}\n";
}
else
{
print "[ skipped ]\n"; print "[ skipped ]\n";
}
} }
sub mtr_report_test_passed ($) { sub mtr_report_test_passed ($) {
...@@ -95,9 +103,18 @@ sub mtr_report_test_failed ($) { ...@@ -95,9 +103,18 @@ sub mtr_report_test_failed ($) {
$tinfo->{'result'}= 'MTR_RES_FAILED'; $tinfo->{'result'}= 'MTR_RES_FAILED';
print "[ fail ]\n"; print "[ fail ]\n";
# FIXME Instead of this test, and meaningless error message in 'else'
# we should write out into $::path_timefile when the error occurs.
if ( -f $::path_timefile )
{
print "Errors are (from $::path_timefile) :\n"; print "Errors are (from $::path_timefile) :\n";
print mtr_fromfile($::path_timefile); # FIXME print_file() instead print mtr_fromfile($::path_timefile); # FIXME print_file() instead
print "\n(the last lines may be the most important ones)\n"; print "\n(the last lines may be the most important ones)\n";
}
else
{
print "Unexpected termination, probably when starting mysqld\n";
}
} }
sub mtr_report_stats ($) { sub mtr_report_stats ($) {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment