summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_cases.pl4
-rw-r--r--mysql-test/lib/mtr_io.pl14
-rw-r--r--mysql-test/lib/mtr_misc.pl1
-rw-r--r--mysql-test/lib/mtr_process.pl5
-rw-r--r--mysql-test/lib/mtr_report.pl7
5 files changed, 27 insertions, 4 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index d270d72d526..9e943fec9ef 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -593,6 +593,10 @@ sub mtr_options_from_test_file($$) {
while ( my $line= <$F> )
{
+
+ # Skip line if it start's with #
+ next if ( $line =~ /^#/ );
+
# Match this line against tag in "tags" array
foreach my $tag (@tags)
{
diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl
index 5be1d2ffddb..842dc09413d 100644
--- a/mysql-test/lib/mtr_io.pl
+++ b/mysql-test/lib/mtr_io.pl
@@ -13,6 +13,8 @@ sub mtr_tofile ($@);
sub mtr_tonewfile($@);
sub mtr_lastlinefromfile($);
sub mtr_appendfile_to_file ($$);
+sub mtr_grab_file($);
+
##############################################################################
#
@@ -129,6 +131,7 @@ sub unspace {
return "$quote$string$quote";
}
+# Read a whole file, stripping leading and trailing whitespace.
sub mtr_fromfile ($) {
my $file= shift;
@@ -182,5 +185,16 @@ sub mtr_appendfile_to_file ($$) {
close TOFILE;
}
+# Read a whole file verbatim.
+sub mtr_grab_file($) {
+ my $file= shift;
+ open(FILE, '<', $file)
+ or return undef;
+ local $/= undef;
+ my $data= scalar(<FILE>);
+ close FILE;
+ return $data;
+}
+
1;
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 846ca25b725..f28e25e5966 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -134,6 +134,7 @@ sub mtr_exe_maybe_exists (@) {
my @path= @_;
map {$_.= ".exe"} @path if $::glob_win32;
+ map {$_.= ".nlm"} @path if $::glob_netware;
foreach my $path ( @path )
{
if($::glob_win32)
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 8a8b8d0858a..330dfddf1d3 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -708,7 +708,7 @@ sub mtr_wait_blocking($) {
}
}
-# Start "mysqladmin shutdown" for a specific mysqld
+# Start "mysqladmin <command>" for a specific mysqld
sub mtr_mysqladmin_start($$$) {
my $srv= shift;
my $command= shift;
@@ -738,9 +738,8 @@ sub mtr_mysqladmin_start($$$) {
# Shutdown time must be high as slave may be in reconnect
mtr_add_arg($args, "--shutdown_timeout=$adm_shutdown_tmo");
mtr_add_arg($args, "$command");
- my $path_mysqladmin_log= "$::opt_vardir/log/mysqladmin.log";
my $pid= mtr_spawn($::exe_mysqladmin, $args,
- "", $path_mysqladmin_log, $path_mysqladmin_log, "",
+ "", "", "", "",
{ append_log_file => 1 });
mtr_verbose("mtr_mysqladmin_start, pid: $pid");
return $pid;
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index d0e836c1a90..a2c16e1941a 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -34,7 +34,12 @@ sub mtr_verbose (@);
# We can't use diff -u or diff -a as these are not portable
sub mtr_show_failed_diff ($) {
- my $tname= shift;
+ my $result_file_name= shift;
+
+ # The reject and log files have been dumped to
+ # to filenames based on the result_file's name
+ my $tname= basename($result_file_name);
+ $tname=~ s/\..*$//;
my $reject_file= "r/$tname.reject";
my $result_file= "r/$tname.result";