Skip to content

Commit f43726a

Browse files
committed
Scipts: --tail-lines option for mtr
1 parent 7153ff8 commit f43726a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mysql-test/mysql-test-run.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ END
220220
our @opt_mysqld_envs;
221221

222222
my $opt_stress;
223+
my $opt_tail_lines= 20;
223224

224225
my $opt_dry_run;
225226

@@ -1205,6 +1206,7 @@ sub command_line_setup {
12051206
'report-times' => \$opt_report_times,
12061207
'result-file' => \$opt_resfile,
12071208
'stress=s' => \$opt_stress,
1209+
'tail-lines=i' => \$opt_tail_lines,
12081210
'dry-run' => \$opt_dry_run,
12091211

12101212
'help|h' => \$opt_usage,
@@ -4856,7 +4858,7 @@ ($)
48564858
$tinfo->{comment}.=
48574859
"The result from queries just before the failure was:".
48584860
"\n< snip >\n".
4859-
mtr_lastlinesfromfile($log_file_name, 20)."\n";
4861+
mtr_lastlinesfromfile($log_file_name, $opt_tail_lines)."\n";
48604862
}
48614863
}
48624864
}
@@ -5538,7 +5540,7 @@ ($)
55385540
mtr_add_arg($args, "--test-file=%s", $tinfo->{'path'});
55395541

55405542
# Number of lines of resut to include in failure report
5541-
mtr_add_arg($args, "--tail-lines=20");
5543+
mtr_add_arg($args, "--tail-lines=%d", $opt_tail_lines);
55425544

55435545
if ( defined $tinfo->{'result_file'} ) {
55445546
mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'});
@@ -6186,6 +6188,8 @@ ($)
61866188
phases of test execution.
61876189
stress=ARGS Run stress test, providing options to
61886190
mysql-stress-test.pl. Options are separated by comma.
6191+
tail-lines=N Number of lines of the result to include in a failure
6192+
report.
61896193
61906194
Some options that control enabling a feature for normal test runs,
61916195
can be turned off by prepending 'no' to the option, e.g. --notimer.

0 commit comments

Comments
 (0)