diff options
author | Sergei Krivonos <sergeikrivonos@gmail.com> | 2021-10-21 15:21:44 +0300 |
---|---|---|
committer | Sergei Krivonos <sergeikrivonos@gmail.com> | 2021-10-21 16:48:00 +0300 |
commit | 7d6617e966c02a08c36d86ac5ae4be70fe0f93e9 (patch) | |
tree | 701ef706f29ad4baab7101a24c0e30a365624288 | |
parent | 39f63f6643a1e56d0199f108518dd14f0c6cbbaa (diff) | |
download | mariadb-git-7d6617e966c02a08c36d86ac5ae4be70fe0f93e9.tar.gz |
MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename $opt_vs_config to $multiconfig to use with other cmake multiconfig generators
-rw-r--r-- | mysql-test/lib/My/Find.pm | 2 | ||||
-rwxr-xr-x | mysql-test/lib/v1/mysql-test-run.pl | 8 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 71 | ||||
-rw-r--r-- | mysql-test/suite/unit/suite.pm | 2 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/suite.pm | 2 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm | 2 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb_stress/suite.pm | 2 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm | 2 |
8 files changed, 46 insertions, 45 deletions
diff --git a/mysql-test/lib/My/Find.pm b/mysql-test/lib/My/Find.pm index b5a07ac8632..b8c13752212 100644 --- a/mysql-test/lib/My/Find.pm +++ b/mysql-test/lib/My/Find.pm @@ -159,7 +159,7 @@ sub my_build_path_list { # User can select to look in a special build dir # which is a subdirectory of any of the paths my @extra_dirs; - my $build_dir= $::opt_vs_config || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR}; + my $build_dir= $::multiconfig || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR}; push(@extra_dirs, $build_dir) if defined $build_dir; if (defined $extension){ diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl index 6fe5f66fbfc..08f256bb2f2 100755 --- a/mysql-test/lib/v1/mysql-test-run.pl +++ b/mysql-test/lib/v1/mysql-test-run.pl @@ -141,7 +141,7 @@ our $opt_tmpdir; # A path but set directly on cmd line # configuration used to build them. To make life easier, an environment # variable or command-line option may be specified to control which set of # executables will be used by the test suite. -our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; +our $multiconfig = $ENV{'MTR_VS_CONFIG'}; our $default_vardir; @@ -502,7 +502,7 @@ sub command_line_setup () { 'compress' => \$opt_compress, 'bench' => \$opt_bench, 'small-bench' => \$opt_small_bench, - 'vs-config' => \$opt_vs_config, + 'vs-config' => \$multiconfig, # Control what test suites or cases to run 'force' => \$opt_force, @@ -2213,9 +2213,9 @@ sub vs_config_dirs ($$) { $exe = "" if not defined $exe; - if ($opt_vs_config) + if ($multiconfig) { - return ("$glob_bindir/$path_part/$opt_vs_config/$exe"); + return ("$glob_bindir/$path_part/$multiconfig/$exe"); } return ("$glob_bindir/$path_part/release/$exe", diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4bc212aedbe..b87263eebd4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -172,7 +172,7 @@ my $path_config_file; # The generated config file, var/my.cnf # configuration used to build them. To make life easier, an environment # variable or command-line option may be specified to control which set of # executables will be used by the test suite. -our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; +our $multiconfig = $ENV{'MTR_VS_CONFIG'}; my @DEFAULT_SUITES= qw( main- @@ -420,7 +420,7 @@ sub check_wsrep_support() { my $my_print_defaults_exe= mtr_exe_maybe_exists( "$bindir/extra/my_print_defaults", - "$bindir/extra/Debug/my_print_defaults", + "$bindir/extra/$multiconfig/my_print_defaults", "$path_client_bindir/my_print_defaults"); my $epath= ""; if ($my_print_defaults_exe ne "") { @@ -481,7 +481,7 @@ sub check_mariabackup_support() { $mariabackup_path= ""; $mariabackup_exe= mtr_exe_maybe_exists( - "$bindir/extra/mariabackup$opt_vs_config/mariabackup", + "$bindir/extra/mariabackup$multiconfig/mariabackup", "$path_client_bindir/mariabackup"); if ($mariabackup_exe ne "") { my $bpath= dirname($mariabackup_exe); @@ -493,7 +493,7 @@ sub check_mariabackup_support() { $ENV{XTRABACKUP}= $mariabackup_exe; $ENV{XBSTREAM}= mtr_exe_maybe_exists( - "$bindir/extra/mariabackup/$opt_vs_config/mbstream", + "$bindir/extra/mariabackup/$multiconfig/mbstream", "$path_client_bindir/mbstream"); $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex"; @@ -1236,7 +1236,7 @@ sub command_line_setup { 'ssl|with-openssl' => \$opt_ssl, 'skip-ssl' => \$opt_skip_ssl, 'compress' => \$opt_compress, - 'vs-config=s' => \$opt_vs_config, + 'vs-config=s' => \$multiconfig, # Max number of parallel threads to use 'parallel=s' => \$opt_parallel, @@ -1416,8 +1416,8 @@ sub command_line_setup { { $path_client_bindir= mtr_path_exists("$bindir/client_release", "$bindir/client_debug", - "$bindir/client/debug", - "$bindir/client$opt_vs_config", + "$bindir/client/$multiconfig", + "$bindir/client$multiconfig", "$bindir/client", "$bindir/bin"); } @@ -1974,7 +1974,7 @@ sub executable_setup () { if ( $opt_embedded_server ) { $exe_mysqltest= - mtr_exe_exists("$bindir/libmysqld/examples$opt_vs_config/mysqltest_embedded", + mtr_exe_exists("$bindir/libmysqld/examples$multiconfig/mysqltest_embedded", "$path_client_bindir/mysqltest_embedded"); } else @@ -2078,10 +2078,10 @@ sub mysql_client_test_arguments(){ # mysql_client_test executable may _not_ exist if ( $opt_embedded_server ) { $exe= mtr_exe_maybe_exists( - "$bindir/libmysqld/examples$opt_vs_config/mysql_client_test_embedded", + "$bindir/libmysqld/examples$multiconfig/mysql_client_test_embedded", "$bindir/bin/mysql_client_test_embedded"); } else { - $exe= mtr_exe_maybe_exists("$bindir/tests$opt_vs_config/mysql_client_test", + $exe= mtr_exe_maybe_exists("$bindir/tests$multiconfig/mysql_client_test", "$bindir/bin/mysql_client_test"); } @@ -2251,7 +2251,7 @@ sub environment_setup { my $client_config_exe= mtr_exe_maybe_exists( - "$bindir/libmariadb/mariadb_config$opt_vs_config/mariadb_config", + "$bindir/libmariadb/mariadb_config$multiconfig/mariadb_config", "$bindir/bin/mariadb_config"); if ($client_config_exe) { @@ -2270,7 +2270,7 @@ sub environment_setup { # some versions, test using it should be skipped # ---------------------------------------------------- my $exe_bug25714= - mtr_exe_maybe_exists("$bindir/tests$opt_vs_config/bug25714"); + mtr_exe_maybe_exists("$bindir/tests$multiconfig/bug25714"); $ENV{'MYSQL_BUG25714'}= native_path($exe_bug25714); # ---------------------------------------------------- @@ -2287,7 +2287,7 @@ sub environment_setup { # my_print_defaults # ---------------------------------------------------- my $exe_my_print_defaults= - mtr_exe_exists("$bindir/extra$opt_vs_config/my_print_defaults", + mtr_exe_exists("$bindir/extra$multiconfig/my_print_defaults", "$path_client_bindir/my_print_defaults"); $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults); @@ -2322,16 +2322,16 @@ sub environment_setup { # ---------------------------------------------------- # perror # ---------------------------------------------------- - my $exe_perror= mtr_exe_exists("$bindir/extra$opt_vs_config/perror", + my $exe_perror= mtr_exe_exists("$bindir/extra$multiconfig/perror", "$path_client_bindir/perror"); $ENV{'MY_PERROR'}= native_path($exe_perror); # ---------------------------------------------------- # mysql_tzinfo_to_sql # ---------------------------------------------------- - my $exe_mysql_tzinfo_to_sql= mtr_exe_exists("$basedir/sql$opt_vs_config/mysql_tzinfo_to_sql", + my $exe_mysql_tzinfo_to_sql= mtr_exe_exists("$basedir/sql$multiconfig/mysql_tzinfo_to_sql", "$path_client_bindir/mysql_tzinfo_to_sql", - "$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql"); + "$bindir/sql$multiconfig/mysql_tzinfo_to_sql"); $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql); # ---------------------------------------------------- @@ -2339,7 +2339,7 @@ sub environment_setup { # ---------------------------------------------------- my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'), "$basedir/extra/replace", - "$bindir/extra$opt_vs_config/replace", + "$bindir/extra$multiconfig/replace", "$path_client_bindir/replace"); $ENV{'REPLACE'}= native_path($exe_replace); @@ -2347,7 +2347,7 @@ sub environment_setup { # innochecksum # ---------------------------------------------------- my $exe_innochecksum= - mtr_exe_maybe_exists("$bindir/extra$opt_vs_config/innochecksum", + mtr_exe_maybe_exists("$bindir/extra$multiconfig/innochecksum", "$path_client_bindir/innochecksum"); if ($exe_innochecksum) { @@ -2535,10 +2535,10 @@ sub setup_vardir() { { if (!$opt_embedded_server) { - for (<$bindir/storage/*$opt_vs_config/*.dll>, - <$bindir/plugin/*$opt_vs_config/*.dll>, - <$bindir/libmariadb$opt_vs_config/*.dll>, - <$bindir/sql$opt_vs_config/*.dll>) + for (<$bindir/storage/*$multiconfig/*.dll>, + <$bindir/plugin/*$multiconfig/*.dll>, + <$bindir/libmariadb$multiconfig/*.dll>, + <$bindir/sql$multiconfig/*.dll>) { my $pname=basename($_); copy rel2abs($_), "$plugindir/$pname"; @@ -2555,11 +2555,11 @@ sub setup_vardir() { unlink "$plugindir/symlink_test"; } - for (<$bindir/storage/*/*.so>, - <$bindir/plugin/*/*.so>, + for (<$bindir/storage/*$multiconfig/*.so>, + <$bindir/plugin/*$multiconfig/*.so>, <$bindir/libmariadb/plugins/*/*.so>, - <$bindir/libmariadb/*.so>, - <$bindir/sql/*.so>) + <$bindir/libmariadb/$multiconfig/*.so>, + <$bindir/sql$multiconfig/*.so>) { my $pname=basename($_); if ($opt_use_copy) @@ -2681,23 +2681,24 @@ sub check_debug_support { # executables, and plugins - that is, something that can affect the test suite # sub fix_vs_config_dir () { - return $opt_vs_config="" unless IS_WINDOWS; - return $opt_vs_config="/$opt_vs_config" if $opt_vs_config; + return $multiconfig="/$multiconfig" if $multiconfig; my $modified = 1e30; - $opt_vs_config=""; + $multiconfig=""; - for (<$bindir/sql/*/mysqld.exe>) { #/ + for (<$bindir/sql/*/mysqld.exe>, + <$bindir/sql/*/mysqld> + ) { #/ if (-M $_ < $modified) { $modified = -M _; - $opt_vs_config = basename(dirname($_)); + $multiconfig = basename(dirname($_)); } } - mtr_report("VS config: $opt_vs_config"); - $opt_vs_config="/$opt_vs_config" if $opt_vs_config; + mtr_report("VS config: $multiconfig"); + $multiconfig="/$multiconfig" if $multiconfig; } @@ -2717,9 +2718,9 @@ sub vs_config_dirs ($$) { # Don't look in these dirs when not on windows return () unless IS_WINDOWS; - if ($opt_vs_config) + if ($multiconfig) { - return ("$basedir/$path_part/$opt_vs_config/$exe"); + return ("$basedir/$path_part/$multiconfig/$exe"); } return ("$basedir/$path_part/release/$exe", diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm index c8180c59240..6cd0dfd4bfd 100644 --- a/mysql-test/suite/unit/suite.pm +++ b/mysql-test/suite/unit/suite.pm @@ -40,7 +40,7 @@ sub start_test { my $bin=$ENV{MTR_BINDIR} || '..'; return "Not run for embedded server" if $::opt_embedded_server; return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake"; - my ($ctest_vs)= $::opt_vs_config ? "-C ".substr($::opt_vs_config,1) : ""; + my ($ctest_vs)= $::multiconfig ? "-C ".substr($::multiconfig,1) : ""; my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`; return "No ctest" if $?; diff --git a/storage/rocksdb/mysql-test/rocksdb/suite.pm b/storage/rocksdb/mysql-test/rocksdb/suite.pm index 633e883f46d..b4feb20a451 100644 --- a/storage/rocksdb/mysql-test/rocksdb/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb/suite.pm @@ -15,7 +15,7 @@ use strict; my $sst_dump= ::mtr_exe_maybe_exists( - "$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", + "$::bindir/storage/rocksdb$::multiconfig/sst_dump", "$::path_client_bindir/sst_dump"); return "RocksDB is not compiled, no sst_dump" unless $sst_dump; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm index 1cc123b2a2a..7e9fba4a59c 100644 --- a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm @@ -13,7 +13,7 @@ use strict; my $sst_dump= ::mtr_exe_maybe_exists( - "$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", + "$::bindir/storage/rocksdb$::multiconfig/sst_dump", "$::path_client_bindir/sst_dump"); return "RocksDB is not compiled, no sst_dump" unless $sst_dump; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm index 106a1d6a0e7..66a46291a8c 100644 --- a/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm @@ -15,7 +15,7 @@ use strict; my $sst_dump= ::mtr_exe_maybe_exists( - "$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", + "$::bindir/storage/rocksdb$::multiconfig/sst_dump", "$::path_client_bindir/sst_dump"); return "RocksDB is not compiled, no sst_dump" unless $sst_dump; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm index 5264d657ef7..d50f4d2422e 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm @@ -12,7 +12,7 @@ use strict; my $sst_dump= ::mtr_exe_maybe_exists( - "$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", + "$::bindir/storage/rocksdb$::multiconfig/sst_dump", "$::path_client_bindir/sst_dump"); return "RocksDB is not compiled, no sst_dump" unless $sst_dump; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; |