2004-12-30 16:34:01 +01:00
|
|
|
# -*- cperl -*-
|
|
|
|
|
|
|
|
# This is a library file used by the Perl version of mysql-test-run,
|
|
|
|
# and is part of the translation of the Bourne shell script with the
|
|
|
|
# same name.
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
sub mtr_report_test_name($);
|
|
|
|
sub mtr_report_test_passed($);
|
|
|
|
sub mtr_report_test_failed($);
|
|
|
|
sub mtr_report_test_skipped($);
|
|
|
|
|
|
|
|
sub mtr_show_failed_diff ($);
|
|
|
|
sub mtr_report_stats ($);
|
|
|
|
sub mtr_print_line ();
|
2005-01-03 16:54:08 +01:00
|
|
|
sub mtr_print_thick_line ();
|
2004-12-30 16:34:01 +01:00
|
|
|
sub mtr_print_header ();
|
|
|
|
sub mtr_report (@);
|
|
|
|
sub mtr_warning (@);
|
|
|
|
sub mtr_error (@);
|
2005-09-14 13:55:53 +02:00
|
|
|
sub mtr_child_error (@);
|
2004-12-30 16:34:01 +01:00
|
|
|
sub mtr_debug (@);
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# We can't use diff -u or diff -a as these are not portable
|
|
|
|
|
|
|
|
sub mtr_show_failed_diff ($) {
|
|
|
|
my $tname= shift;
|
|
|
|
|
|
|
|
my $reject_file= "r/$tname.reject";
|
|
|
|
my $result_file= "r/$tname.result";
|
2006-03-23 21:48:31 +01:00
|
|
|
my $log_file= "r/$tname.log";
|
2004-12-30 16:34:01 +01:00
|
|
|
my $eval_file= "r/$tname.eval";
|
|
|
|
|
2005-06-21 02:21:52 +02:00
|
|
|
if ( $::opt_suite ne "main" )
|
|
|
|
{
|
|
|
|
$reject_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$reject_file";
|
|
|
|
$result_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$result_file";
|
|
|
|
$eval_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$eval_file";
|
2006-03-23 21:48:31 +01:00
|
|
|
$log_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$log_file";
|
2005-06-21 02:21:52 +02:00
|
|
|
}
|
|
|
|
|
2004-12-30 16:34:01 +01:00
|
|
|
if ( -f $eval_file )
|
2006-03-23 21:48:31 +01:00
|
|
|
{
|
2004-12-30 16:34:01 +01:00
|
|
|
$result_file= $eval_file;
|
|
|
|
}
|
|
|
|
elsif ( $::opt_result_ext and
|
|
|
|
( $::opt_record or -f "$result_file$::opt_result_ext" ))
|
|
|
|
{
|
|
|
|
# If we have an special externsion for result files we use it if we are
|
|
|
|
# recording or a result file with that extension exists.
|
|
|
|
$result_file= "$result_file$::opt_result_ext";
|
|
|
|
}
|
|
|
|
|
2005-02-07 20:32:56 +01:00
|
|
|
my $diffopts= $::opt_udiff ? "-u" : "-c";
|
|
|
|
|
2004-12-30 16:34:01 +01:00
|
|
|
if ( -f $reject_file )
|
|
|
|
{
|
|
|
|
print "Below are the diffs between actual and expected results:\n";
|
|
|
|
print "-------------------------------------------------------\n";
|
|
|
|
# FIXME check result code?!
|
2005-02-07 20:32:56 +01:00
|
|
|
mtr_run("diff",[$diffopts,$result_file,$reject_file], "", "", "", "");
|
2004-12-30 16:34:01 +01:00
|
|
|
print "-------------------------------------------------------\n";
|
|
|
|
print "Please follow the instructions outlined at\n";
|
|
|
|
print "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html\n";
|
|
|
|
print "to find the reason to this problem and how to report this.\n\n";
|
|
|
|
}
|
2006-03-23 21:48:31 +01:00
|
|
|
|
|
|
|
if ( -f $log_file )
|
|
|
|
{
|
|
|
|
print "Result from queries before failure can be found in $log_file\n";
|
|
|
|
# FIXME Maybe a tail -f -n 10 $log_file here
|
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_report_test_name ($) {
|
|
|
|
my $tinfo= shift;
|
|
|
|
|
2005-09-14 13:12:30 +02:00
|
|
|
printf "%-30s ", $tinfo->{'name'};
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_report_test_skipped ($) {
|
|
|
|
my $tinfo= shift;
|
|
|
|
|
|
|
|
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
|
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
2005-02-03 21:13:27 +01:00
|
|
|
if ( $tinfo->{'disable'} )
|
|
|
|
{
|
|
|
|
print "[ disabled ] $tinfo->{'comment'}\n";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
print "[ skipped ]\n";
|
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_report_test_passed ($) {
|
|
|
|
my $tinfo= shift;
|
|
|
|
|
|
|
|
my $timer= "";
|
2005-05-15 17:22:54 +02:00
|
|
|
if ( $::opt_timer and -f "$::opt_vardir/log/timer" )
|
2005-03-21 16:01:39 +01:00
|
|
|
{
|
2005-05-15 17:22:54 +02:00
|
|
|
$timer= mtr_fromfile("$::opt_vardir/log/timer");
|
|
|
|
$::glob_tot_real_time += $timer;
|
2005-03-21 16:01:39 +01:00
|
|
|
$timer= sprintf "%12s", $timer;
|
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
|
|
|
print "[ pass ] $timer\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_report_test_failed ($) {
|
|
|
|
my $tinfo= shift;
|
|
|
|
|
|
|
|
$tinfo->{'result'}= 'MTR_RES_FAILED';
|
2005-08-18 00:16:44 +02:00
|
|
|
if ( $tinfo->{'timeout'} )
|
|
|
|
{
|
|
|
|
print "[ fail ] timeout\n";
|
|
|
|
}
|
2006-03-07 19:44:58 +01:00
|
|
|
elsif ( $tinfo->{'ndb_test'} and !$::flag_ndb_status_ok)
|
|
|
|
{
|
|
|
|
print "[ fail ] ndbcluster start failure\n";
|
|
|
|
return;
|
|
|
|
}
|
2005-08-18 00:16:44 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
print "[ fail ]\n";
|
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
|
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
2005-02-03 21:13:27 +01:00
|
|
|
# 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 )
|
|
|
|
{
|
2005-09-14 13:12:30 +02:00
|
|
|
print "\nErrors are (from $::path_timefile) :\n";
|
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
2005-02-03 21:13:27 +01:00
|
|
|
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
|
|
|
|
print "\n(the last lines may be the most important ones)\n";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-09-14 13:12:30 +02:00
|
|
|
print "\nUnexpected termination, probably when starting mysqld\n";
|
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
2005-02-03 21:13:27 +01:00
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_report_stats ($) {
|
|
|
|
my $tests= shift;
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Find out how we where doing
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
my $tot_skiped= 0;
|
|
|
|
my $tot_passed= 0;
|
|
|
|
my $tot_failed= 0;
|
|
|
|
my $tot_tests= 0;
|
|
|
|
|
|
|
|
foreach my $tinfo (@$tests)
|
|
|
|
{
|
|
|
|
if ( $tinfo->{'result'} eq 'MTR_RES_SKIPPED' )
|
|
|
|
{
|
|
|
|
$tot_skiped++;
|
|
|
|
}
|
|
|
|
elsif ( $tinfo->{'result'} eq 'MTR_RES_PASSED' )
|
|
|
|
{
|
|
|
|
$tot_tests++;
|
|
|
|
$tot_passed++;
|
|
|
|
}
|
|
|
|
elsif ( $tinfo->{'result'} eq 'MTR_RES_FAILED' )
|
|
|
|
{
|
|
|
|
$tot_tests++;
|
|
|
|
$tot_failed++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Print out a summary report to screen
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if ( ! $tot_failed )
|
|
|
|
{
|
|
|
|
print "All $tot_tests tests were successful.\n";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
my $ratio= $tot_passed * 100 / $tot_tests;
|
|
|
|
printf "Failed $tot_failed/$tot_tests tests, " .
|
2005-03-11 11:08:27 +01:00
|
|
|
"%.2f\% were successful.\n\n", $ratio;
|
2004-12-30 16:34:01 +01:00
|
|
|
print
|
|
|
|
"The log files in var/log may give you some hint\n",
|
2005-08-31 16:28:47 +02:00
|
|
|
"of what went wrong.\n",
|
2004-12-30 16:34:01 +01:00
|
|
|
"If you want to report this error, please read first ",
|
|
|
|
"the documentation at\n",
|
|
|
|
"http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
2006-02-12 04:13:24 +01:00
|
|
|
# If a debug run, there might be interesting information inside
|
|
|
|
# the "var/log/*.err" files. We save this info in "var/log/warnings"
|
2004-12-30 16:34:01 +01:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if ( ! $::glob_use_running_server )
|
|
|
|
{
|
2006-02-12 04:13:24 +01:00
|
|
|
# Save and report if there was any fatal warnings/errors in err logs
|
2004-12-30 16:34:01 +01:00
|
|
|
|
2006-02-12 04:13:24 +01:00
|
|
|
my $warnlog= "$::opt_vardir/log/warnings";
|
|
|
|
|
|
|
|
unless ( open(WARN, ">$warnlog") )
|
|
|
|
{
|
|
|
|
mtr_warning("can't write to the file \"$warnlog\": $!");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
my $found_problems= 0; # Some warnings are errors...
|
|
|
|
|
|
|
|
# We report different types of problems in order
|
|
|
|
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x" )
|
|
|
|
{
|
|
|
|
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
|
|
|
|
{
|
|
|
|
unless ( open(ERR, $errlog) )
|
|
|
|
{
|
|
|
|
mtr_warning("can't read $errlog");
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
while ( <ERR> )
|
|
|
|
{
|
|
|
|
# Skip some non fatal warnings from the log files
|
|
|
|
if ( /Warning:\s+Table:.* on (delete|rename)/ or
|
|
|
|
/Warning:\s+Setting lower_case_table_names=2/ or
|
|
|
|
/Warning:\s+One can only use the --user.*root/ )
|
|
|
|
{
|
|
|
|
next; # Skip these lines
|
|
|
|
}
|
|
|
|
if ( /$pattern/ )
|
|
|
|
{
|
|
|
|
$found_problems= 1;
|
|
|
|
print WARN $_;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( $found_problems )
|
|
|
|
{
|
|
|
|
mtr_warning("Got errors/warnings while running tests, please examine",
|
|
|
|
"\"$warnlog\" for details.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
print "\n";
|
|
|
|
|
|
|
|
if ( $tot_failed != 0 )
|
|
|
|
{
|
2005-08-31 16:28:47 +02:00
|
|
|
my $test_mode= join(" ", @::glob_test_mode) || "default";
|
|
|
|
print "mysql-test-run in $test_mode mode: *** Failing the test(s):";
|
2004-12-30 16:34:01 +01:00
|
|
|
|
|
|
|
foreach my $tinfo (@$tests)
|
|
|
|
{
|
|
|
|
if ( $tinfo->{'result'} eq 'MTR_RES_FAILED' )
|
|
|
|
{
|
|
|
|
print " $tinfo->{'name'}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print "\n";
|
|
|
|
mtr_error("there where failing test cases");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# Text formatting
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
sub mtr_print_line () {
|
|
|
|
print '-' x 55, "\n";
|
|
|
|
}
|
|
|
|
|
2005-01-03 16:54:08 +01:00
|
|
|
sub mtr_print_thick_line () {
|
|
|
|
print '=' x 55, "\n";
|
|
|
|
}
|
|
|
|
|
2004-12-30 16:34:01 +01:00
|
|
|
sub mtr_print_header () {
|
|
|
|
print "\n";
|
|
|
|
if ( $::opt_timer )
|
|
|
|
{
|
2005-09-30 00:52:18 +02:00
|
|
|
print "TEST RESULT TIME (ms)\n";
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-09-30 00:52:18 +02:00
|
|
|
print "TEST RESULT\n";
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
mtr_print_line();
|
|
|
|
print "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# Misc
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
sub mtr_report (@) {
|
|
|
|
print join(" ", @_),"\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_warning (@) {
|
|
|
|
print STDERR "mysql-test-run: WARNING: ",join(" ", @_),"\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub mtr_error (@) {
|
2005-06-05 20:10:47 +02:00
|
|
|
print STDERR "mysql-test-run: *** ERROR: ",join(" ", @_),"\n";
|
|
|
|
mtr_exit(1);
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
|
2005-09-14 13:55:53 +02:00
|
|
|
sub mtr_child_error (@) {
|
|
|
|
print STDERR "mysql-test-run: *** ERROR(child): ",join(" ", @_),"\n";
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2004-12-30 16:34:01 +01:00
|
|
|
sub mtr_debug (@) {
|
|
|
|
if ( $::opt_script_debug )
|
|
|
|
{
|
2005-01-03 16:54:08 +01:00
|
|
|
print STDERR "####: ",join(" ", @_),"\n";
|
2004-12-30 16:34:01 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|