diff options
author | unknown <joerg@mysql.com> | 2005-03-17 16:44:25 +0100 |
---|---|---|
committer | unknown <joerg@mysql.com> | 2005-03-17 16:44:25 +0100 |
commit | 94c3958e5de16f325bbfd161522e7e7cb9ea1154 (patch) | |
tree | 8bd6aa531d059f54cef5550dccbc42926d3a30fd /Build-tools | |
parent | 0c0a2d5590571b43f0eb300c984c600d4996b91c (diff) | |
parent | 5be39a0c956cfaaa3febba55afc4c3ebbcff83f7 (diff) | |
download | mariadb-git-94c3958e5de16f325bbfd161522e7e7cb9ea1154.tar.gz |
Manual merge.
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/Do-compile | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 0cd782c023e..346c1958979 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -12,6 +12,7 @@ $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_su $opt_tmp=$opt_version_suffix=""; $opt_bundled_zlib=$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_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0; $opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_with_federated=0; +$global_step=""; GetOptions( "bdb", @@ -179,7 +180,8 @@ info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\ info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}"); info("PATH is $ENV{PATH}"); -log_timestamp(); +$global_step= "Check MD5, shutdown"; +log_timestamp("START"); $md5_result= safe_system("perl $ENV{HOME}/my_md5sum -c ${opt_distribution}.md5"); @@ -207,9 +209,10 @@ kill_all("mysqlmanager"); kill_all("$pwd/host/mysql"); kill_all("$pwd/host/test"); +$global_step= "directory cleanup"; if ($opt_stage == 0) { - log_timestamp(); + log_timestamp("START"); print "$host: Removing old distribution\n" if ($opt_debug); if (!$opt_use_old_distribution) { @@ -255,10 +258,11 @@ safe_cd("$pwd/$host/$ver"); # # Configure the sources # +$global_step= "configure"; if ($opt_stage <= 1) { # Fix files if this is in another timezone than the build host - log_timestamp(); + log_timestamp("START"); unlink("config.cache"); unlink("bdb/build_unix/config.cache"); unlink("innobase/config.cache"); @@ -312,29 +316,33 @@ if ($opt_stage <= 1) { safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include"); } + log_timestamp("DONE "); } # # Compile the binaries # +$global_step= "compile + link"; if ($opt_stage <= 2) { my ($command); - log_timestamp(); + log_timestamp("START"); unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution); $command=$make; $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne ""); safe_system($command); print LOG "Do-compile: Build successful\n"; + log_timestamp("DONE "); } # # Create the binary distribution # +$global_step= "pack binary distribution"; if ($opt_stage <= 3) { + log_timestamp("START"); my $flags= ""; - log_timestamp(); log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz"); # No need to add the debug symbols, if the binaries are not stripped (saves space) unless ($opt_with_debug || $opt_no_strip) @@ -355,6 +363,7 @@ if ($opt_stage <= 3) safe_system("cp client/mysqladmin $pwd/$host/bin"); } safe_system("$make clean") if ($opt_with_small_disk); + log_timestamp("DONE "); } $tar_file=<$pwd/$host/mysql*.t*gz>; @@ -369,11 +378,13 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit # Unpack the binary distribution # if ($opt_stage <= 4 && !$opt_no_test) +$global_step= "extract binary distribution"; { - log_timestamp(); + log_timestamp("START"); rm_all(<$pwd/$host/test/*>); safe_cd("$pwd/$host/test"); safe_system("gunzip < $tar_file | $tar xf -"); + log_timestamp("DONE "); } $tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/; @@ -386,30 +397,36 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . # Run the test suite # if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) +$global_step= "tests in default mode"; { + log_timestamp("START"); my $flags= ""; $flags.= " --with-ndbcluster" if ($opt_with_cluster); $flags.= " --force" if (!$opt_one_error); - log_timestamp(); info("Running test suite"); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); safe_cd("${test_dir}/mysql-test"); check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); + log_timestamp("DONE "); + $global_step= "tests using prepared statements"; unless ($opt_skip_ps_test) { - log_timestamp(); + log_timestamp("START"); info("Running test suite using prepared statements"); check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); + log_timestamp("DONE "); } + $global_step= "tests using embedded server"; unless ($opt_skip_embedded_test) { - log_timestamp(); + log_timestamp("START"); info("Running embedded server test suite"); # Embedded server and NDB don't jive $flags=~ s/ --with-ndbcluster//; check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); + log_timestamp("DONE "); } # 'mysql-test-run' writes its own final message for log evaluation. } @@ -441,10 +458,11 @@ if (!$opt_no_test && !$opt_no_benchmark) # # Compile and install the required Perl modules # +$global_step= "installing Perl modules"; if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test && !$opt_no_benchmark) { - log_timestamp(); + log_timestamp("START"); safe_cd($test_dir); rm_all("perl"); safe_system("mkdir perl"); @@ -473,25 +491,29 @@ if ($opt_stage <= 7 && $opt_perl_files && !$opt_no_perl && !$opt_no_test && safe_system($opt_static_perl ? "perl Makefile.PL -static $options" : "perl Makefile.PL $options"); safe_system("$make ; $sur $make install"); } + log_timestamp("DONE "); } # # Run crash-me test # +$global_step= "crash-me checks"; if ($opt_stage <= 8 && !$opt_no_test && !$opt_no_crash_me) { - log_timestamp(); + log_timestamp("START"); safe_cd("$test_dir/sql-bench"); log_system("rm -f limits/mysql.cfg"); safe_system("perl ./crash-me --force --batch-mode $connect_option"); + log_timestamp("DONE "); } # # Run sql-bench Benchmarks # +$global_step= "benchmarks"; if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark) { - log_timestamp(); + log_timestamp("START"); safe_cd("$test_dir/sql-bench"); log_system("rm -f output/*"); $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; @@ -506,6 +528,7 @@ if ($opt_stage <= 9 && !$opt_no_test && !$opt_no_benchmark) { check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql"); } + log_timestamp("DONE "); } rm_all($bench_tmpdir); @@ -690,7 +713,7 @@ sub abort my($mail_header_file); print LOG "\n$message\n"; print "$host: $message\n" if ($opt_debug); - print LOG "Aborting\n"; + log_timestamp("ABORT"); close LOG; if ($opt_user) @@ -866,6 +889,7 @@ sub kill_all if (!open(PS, "$pscmd|")) { print "Warning: Can't run $pscmd: $!\n"; + log_timestamp("ABORT"); exit; } @@ -904,8 +928,10 @@ sub killpid # sub log_timestamp { + my ($message) = @_; my @ta=localtime(time()); - print LOG sprintf("%4d-%02d-%02d %02d:%02d:%02d\n", - $ta[5]+1900, $ta[4]+1, $ta[3], $ta[2], $ta[1], $ta[0]); + print LOG sprintf("%4d-%02d-%02d %02d:%02d:%02d %s %s\n", + $ta[5]+1900, $ta[4]+1, $ta[3], $ta[2], $ta[1], $ta[0], + $message, $global_step); } |