Commit b03daf97 authored by unknown's avatar unknown

Change "Do-compile" to make automatic build log analysis easier and

to run the standard tests with "--force" (default, can be switched off).


Build-tools/Do-compile:
  1) For an automated log analysis, we need a clear marker in the build log
     whether compile + link succeeded: Write it after successful "make".
  2) Ensure the standard tests are run with "--force" in the default case,
     but allow the old behaviour by an option "--one-error".
  3) Correct a typing error in the usage message.
parent cd7be725
...@@ -10,7 +10,7 @@ use Sys::Hostname; ...@@ -10,7 +10,7 @@ use Sys::Hostname;
$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env=""; $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0;
GetOptions( GetOptions(
...@@ -36,6 +36,7 @@ GetOptions( ...@@ -36,6 +36,7 @@ GetOptions(
"no-test", "no-test",
"no-mysqltest", "no-mysqltest",
"no-benchmark", "no-benchmark",
"one-error",
"perl-files=s", "perl-files=s",
"perl-options=s", "perl-options=s",
"raid", "raid",
...@@ -298,6 +299,7 @@ if ($opt_stage <= 2) ...@@ -298,6 +299,7 @@ if ($opt_stage <= 2)
$command=$make; $command=$make;
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne ""); $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
safe_system($command); safe_system($command);
print LOG "Do-compile: Build successful\n";
} }
# #
...@@ -358,10 +360,16 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . ...@@ -358,10 +360,16 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
# #
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{ {
my $force= "";
if (!$opt_one_error)
{
$force= "--force"; # default
}
log_timestamp(); log_timestamp();
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
safe_cd("${test_dir}/mysql-test"); safe_cd("${test_dir}/mysql-test");
check_system("./mysql-test-run --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); check_system("./mysql-test-run $force --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
# 'mysql-test-run' writes its own final message for log evaluation.
} }
# #
...@@ -535,7 +543,10 @@ Do not run any tests. ...@@ -535,7 +543,10 @@ Do not run any tests.
Do not run the benchmark test (written in perl) Do not run the benchmark test (written in perl)
--no-mysqltest --no-mysqltest
Do not run the the mysql-test-run test (Same as 'make test') Do not run the mysql-test-run test (Same as 'make test')
--one-error
Terminate the mysql-test-run test after the first difference (default: use '--force')
--perl-files=list of files --perl-files=list of files
Compile and install the given perl modules. Compile and install the given perl modules.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment