From facaaeb4c4fab01188b0e79ef1c3787a87e5d252 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Nov 2006 02:22:33 +0100 Subject: [PATCH 1/2] mysql-test-run.sh: Added --force-restart pseudo server argument to shell version as well mysql-test/mysql-test-run.sh: Added --force-restart pseudo server argument to shell version as well --- mysql-test/mysql-test-run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 141a725db2e..57c3a422828 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1606,10 +1606,13 @@ run_testcase () --result-file=*) result_file=`$ECHO "$EXTRA_MASTER_OPT" | $SED -e "s;--result-file=;;"` result_file="r/$result_file.result" - # Note that this must be set to space, not "" for test-reset to -# work + # Note that this must be set to space, not "" for test-reset to work EXTRA_MASTER_OPT=" " ;; + --force-restart) + # Note that this must be set to space, not "" for test-reset to work + EXTRA_MASTER_OPT=" " + ;; esac stop_master stop_master 1 From df1b6ae6e11a3f8366b11195d7b3f75b3e95ea84 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Nov 2006 13:12:08 +0100 Subject: [PATCH 2/2] add --report-features to mysql-test-run.pl mysql-test/mysql-test-run.pl: add --report-features mysql-test/include/report-features.test: test file showing server features for mysql-test-run.pl --report-features --- mysql-test/include/report-features.test | 11 ++++++ mysql-test/mysql-test-run.pl | 52 +++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 mysql-test/include/report-features.test diff --git a/mysql-test/include/report-features.test b/mysql-test/include/report-features.test new file mode 100644 index 00000000000..df395f6e3f0 --- /dev/null +++ b/mysql-test/include/report-features.test @@ -0,0 +1,11 @@ +# +# show server variables +# + +--disable_query_log +--echo ===== ENGINES ===== +show engines; +--echo ===== VARIABLES ===== +show variables; +--echo ===== STOP ===== +--enable_query_log diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index de2498a7246..5aba3ccfe68 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -182,6 +182,7 @@ our $opt_force; our $opt_reorder= 0; our $opt_enable_disabled; our $opt_mem; +our $opt_report_features; our $opt_gcov; our $opt_gcov_err; @@ -423,10 +424,14 @@ sub main () { if ( ! $need_im ) { $opt_skip_im= 1; - } + } initialize_servers(); + if ( $opt_report_features ) { + run_report_features(); + } + run_suite($opt_suite, $tests); } @@ -670,6 +675,7 @@ sub command_line_setup () { 'mem' => \$opt_mem, # Misc + 'report-features' => \$opt_report_features, 'comment=s' => \$opt_comment, 'debug' => \$opt_debug, 'fast' => \$opt_fast, @@ -4190,6 +4196,43 @@ sub run_check_testcase ($$) { return $res; } +############################################################################## +# +# Report the features that were compiled in +# +############################################################################## + +sub run_report_features () { + my $args; + + if ( ! $glob_use_embedded_server ) + { + mysqld_start($master->[0],[],[]); + if ( ! $master->[0]->{'pid'} ) + { + mtr_error("Can't start the mysqld server"); + } + mysqld_wait_started($master->[0]); + } + + my $tinfo = {}; + $tinfo->{'name'} = 'report features'; + $tinfo->{'result_file'} = undef; + $tinfo->{'component_id'} = 'mysqld'; + $tinfo->{'path'} = 'include/report-features.test'; + $tinfo->{'timezone'}= "GMT-3"; + $tinfo->{'slave_num'} = 0; + $tinfo->{'master_opt'} = []; + $tinfo->{'slave_opt'} = []; + $tinfo->{'slave_mi'} = []; + $tinfo->{'comment'} = 'report server features'; + run_mysqltest($tinfo); + + if ( ! $glob_use_embedded_server ) + { + stop_all_servers(); + } +} sub run_mysqltest ($) { @@ -4329,8 +4372,10 @@ sub run_mysqltest ($) { mtr_add_arg($args, "--test-file"); mtr_add_arg($args, $tinfo->{'path'}); - mtr_add_arg($args, "--result-file"); - mtr_add_arg($args, $tinfo->{'result_file'}); + if ( defined $tinfo->{'result_file'} ) { + mtr_add_arg($args, "--result-file"); + mtr_add_arg($args, $tinfo->{'result_file'}); + } if ( $opt_record ) { @@ -4739,3 +4784,4 @@ HERE mtr_exit(1); } +