summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_process.pl
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2007-08-03 12:36:32 +0200
committerunknown <msvensson@shellback.(none)>2007-08-03 12:36:32 +0200
commitf98f12582e2a026e060b47f544f16426731aaca3 (patch)
treee2be66dcca5d9c0076c7f78344ce38fe98657049 /mysql-test/lib/mtr_process.pl
parent6fb214b4261b60fbfd4d27f780f639eadfcfcdc0 (diff)
downloadmariadb-git-f98f12582e2a026e060b47f544f16426731aaca3.tar.gz
Send output to var/log/mysql-test-run.log to facilitate easier debugging
of mysql-test-run.pl mysql-test/lib/mtr_process.pl: Change from "print" to "mtr_debug" to get messages logged to file as well mysql-test/lib/mtr_report.pl: - Add "mtr_log_init" function used for opening the log file - Change from "print" to "mtr_report" to get the messages logged - Make printout functions log to the log file mysql-test/mysql-test-run.pl: - Open the mysql-test-run log file as soon as var/log has been created - Change from "print" to "mtr_report" to get the messgages to log as well
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r--mysql-test/lib/mtr_process.pl21
1 files changed, 11 insertions, 10 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index f5ef028fa24..a60b2822a14 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -99,25 +99,26 @@ sub spawn_impl ($$$$$$$) {
if ( $::opt_script_debug )
{
- print STDERR "\n";
- print STDERR "#### ", "-" x 78, "\n";
- print STDERR "#### ", "STDIN $input\n" if $input;
- print STDERR "#### ", "STDOUT $output\n" if $output;
- print STDERR "#### ", "STDERR $error\n" if $error;
- print STDERR "#### ", "$mode : $path ", join(" ",@$arg_list_t), "\n";
- print STDERR "#### ", "spawn options:\n";
+ mtr_report("");
+ mtr_debug("-" x 73);
+ mtr_debug("STDIN $input") if $input;
+ mtr_debug("STDOUT $output") if $output;
+ mtr_debug("STDERR $error") if $error;
+ mtr_debug("$mode: $path ", join(" ",@$arg_list_t));
+ mtr_debug("spawn options:");
if ($spawn_opts)
{
foreach my $key (sort keys %{$spawn_opts})
{
- print STDERR "#### ", " - $key: $spawn_opts->{$key}\n";
+ mtr_debug(" - $key: $spawn_opts->{$key}");
}
}
else
{
- print STDERR "#### ", " none\n";
+ mtr_debug(" none");
}
- print STDERR "#### ", "-" x 78, "\n";
+ mtr_debug("-" x 73);
+ mtr_report("");
}
mtr_error("Can't spawn with empty \"path\"") unless defined $path;