Commit 7d6617e9 authored by Sergei Krivonos's avatar Sergei Krivonos

MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename...

MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename $opt_vs_config to $multiconfig to use with other cmake multiconfig generators
parent 39f63f66
...@@ -159,7 +159,7 @@ sub my_build_path_list { ...@@ -159,7 +159,7 @@ sub my_build_path_list {
# User can select to look in a special build dir # User can select to look in a special build dir
# which is a subdirectory of any of the paths # which is a subdirectory of any of the paths
my @extra_dirs; 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; push(@extra_dirs, $build_dir) if defined $build_dir;
if (defined $extension){ if (defined $extension){
......
...@@ -141,7 +141,7 @@ our $opt_tmpdir; # A path but set directly on cmd line ...@@ -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 # configuration used to build them. To make life easier, an environment
# variable or command-line option may be specified to control which set of # variable or command-line option may be specified to control which set of
# executables will be used by the test suite. # 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; our $default_vardir;
...@@ -502,7 +502,7 @@ sub command_line_setup () { ...@@ -502,7 +502,7 @@ sub command_line_setup () {
'compress' => \$opt_compress, 'compress' => \$opt_compress,
'bench' => \$opt_bench, 'bench' => \$opt_bench,
'small-bench' => \$opt_small_bench, 'small-bench' => \$opt_small_bench,
'vs-config' => \$opt_vs_config, 'vs-config' => \$multiconfig,
# Control what test suites or cases to run # Control what test suites or cases to run
'force' => \$opt_force, 'force' => \$opt_force,
...@@ -2213,9 +2213,9 @@ sub vs_config_dirs ($$) { ...@@ -2213,9 +2213,9 @@ sub vs_config_dirs ($$) {
$exe = "" if not defined $exe; $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", return ("$glob_bindir/$path_part/release/$exe",
......
...@@ -172,7 +172,7 @@ my $path_config_file; # The generated config file, var/my.cnf ...@@ -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 # configuration used to build them. To make life easier, an environment
# variable or command-line option may be specified to control which set of # variable or command-line option may be specified to control which set of
# executables will be used by the test suite. # 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( my @DEFAULT_SUITES= qw(
main- main-
...@@ -420,7 +420,7 @@ sub check_wsrep_support() { ...@@ -420,7 +420,7 @@ sub check_wsrep_support() {
my $my_print_defaults_exe= my $my_print_defaults_exe=
mtr_exe_maybe_exists( mtr_exe_maybe_exists(
"$bindir/extra/my_print_defaults", "$bindir/extra/my_print_defaults",
"$bindir/extra/Debug/my_print_defaults", "$bindir/extra/$multiconfig/my_print_defaults",
"$path_client_bindir/my_print_defaults"); "$path_client_bindir/my_print_defaults");
my $epath= ""; my $epath= "";
if ($my_print_defaults_exe ne "") { if ($my_print_defaults_exe ne "") {
...@@ -481,7 +481,7 @@ sub check_mariabackup_support() { ...@@ -481,7 +481,7 @@ sub check_mariabackup_support() {
$mariabackup_path= ""; $mariabackup_path= "";
$mariabackup_exe= $mariabackup_exe=
mtr_exe_maybe_exists( mtr_exe_maybe_exists(
"$bindir/extra/mariabackup$opt_vs_config/mariabackup", "$bindir/extra/mariabackup$multiconfig/mariabackup",
"$path_client_bindir/mariabackup"); "$path_client_bindir/mariabackup");
if ($mariabackup_exe ne "") { if ($mariabackup_exe ne "") {
my $bpath= dirname($mariabackup_exe); my $bpath= dirname($mariabackup_exe);
...@@ -493,7 +493,7 @@ sub check_mariabackup_support() { ...@@ -493,7 +493,7 @@ sub check_mariabackup_support() {
$ENV{XTRABACKUP}= $mariabackup_exe; $ENV{XTRABACKUP}= $mariabackup_exe;
$ENV{XBSTREAM}= mtr_exe_maybe_exists( $ENV{XBSTREAM}= mtr_exe_maybe_exists(
"$bindir/extra/mariabackup/$opt_vs_config/mbstream", "$bindir/extra/mariabackup/$multiconfig/mbstream",
"$path_client_bindir/mbstream"); "$path_client_bindir/mbstream");
$ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex"; $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex";
...@@ -1236,7 +1236,7 @@ sub command_line_setup { ...@@ -1236,7 +1236,7 @@ sub command_line_setup {
'ssl|with-openssl' => \$opt_ssl, 'ssl|with-openssl' => \$opt_ssl,
'skip-ssl' => \$opt_skip_ssl, 'skip-ssl' => \$opt_skip_ssl,
'compress' => \$opt_compress, 'compress' => \$opt_compress,
'vs-config=s' => \$opt_vs_config, 'vs-config=s' => \$multiconfig,
# Max number of parallel threads to use # Max number of parallel threads to use
'parallel=s' => \$opt_parallel, 'parallel=s' => \$opt_parallel,
...@@ -1416,8 +1416,8 @@ sub command_line_setup { ...@@ -1416,8 +1416,8 @@ sub command_line_setup {
{ {
$path_client_bindir= mtr_path_exists("$bindir/client_release", $path_client_bindir= mtr_path_exists("$bindir/client_release",
"$bindir/client_debug", "$bindir/client_debug",
"$bindir/client/debug", "$bindir/client/$multiconfig",
"$bindir/client$opt_vs_config", "$bindir/client$multiconfig",
"$bindir/client", "$bindir/client",
"$bindir/bin"); "$bindir/bin");
} }
...@@ -1974,7 +1974,7 @@ sub executable_setup () { ...@@ -1974,7 +1974,7 @@ sub executable_setup () {
if ( $opt_embedded_server ) if ( $opt_embedded_server )
{ {
$exe_mysqltest= $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"); "$path_client_bindir/mysqltest_embedded");
} }
else else
...@@ -2078,10 +2078,10 @@ sub mysql_client_test_arguments(){ ...@@ -2078,10 +2078,10 @@ sub mysql_client_test_arguments(){
# mysql_client_test executable may _not_ exist # mysql_client_test executable may _not_ exist
if ( $opt_embedded_server ) { if ( $opt_embedded_server ) {
$exe= mtr_exe_maybe_exists( $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"); "$bindir/bin/mysql_client_test_embedded");
} else { } 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"); "$bindir/bin/mysql_client_test");
} }
...@@ -2251,7 +2251,7 @@ sub environment_setup { ...@@ -2251,7 +2251,7 @@ sub environment_setup {
my $client_config_exe= my $client_config_exe=
mtr_exe_maybe_exists( mtr_exe_maybe_exists(
"$bindir/libmariadb/mariadb_config$opt_vs_config/mariadb_config", "$bindir/libmariadb/mariadb_config$multiconfig/mariadb_config",
"$bindir/bin/mariadb_config"); "$bindir/bin/mariadb_config");
if ($client_config_exe) if ($client_config_exe)
{ {
...@@ -2270,7 +2270,7 @@ sub environment_setup { ...@@ -2270,7 +2270,7 @@ sub environment_setup {
# some versions, test using it should be skipped # some versions, test using it should be skipped
# ---------------------------------------------------- # ----------------------------------------------------
my $exe_bug25714= 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); $ENV{'MYSQL_BUG25714'}= native_path($exe_bug25714);
# ---------------------------------------------------- # ----------------------------------------------------
...@@ -2287,7 +2287,7 @@ sub environment_setup { ...@@ -2287,7 +2287,7 @@ sub environment_setup {
# my_print_defaults # my_print_defaults
# ---------------------------------------------------- # ----------------------------------------------------
my $exe_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"); "$path_client_bindir/my_print_defaults");
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults); $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults);
...@@ -2322,16 +2322,16 @@ sub environment_setup { ...@@ -2322,16 +2322,16 @@ sub environment_setup {
# ---------------------------------------------------- # ----------------------------------------------------
# perror # 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"); "$path_client_bindir/perror");
$ENV{'MY_PERROR'}= native_path($exe_perror); $ENV{'MY_PERROR'}= native_path($exe_perror);
# ---------------------------------------------------- # ----------------------------------------------------
# mysql_tzinfo_to_sql # 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", "$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); $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql);
# ---------------------------------------------------- # ----------------------------------------------------
...@@ -2339,7 +2339,7 @@ sub environment_setup { ...@@ -2339,7 +2339,7 @@ sub environment_setup {
# ---------------------------------------------------- # ----------------------------------------------------
my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'), my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
"$basedir/extra/replace", "$basedir/extra/replace",
"$bindir/extra$opt_vs_config/replace", "$bindir/extra$multiconfig/replace",
"$path_client_bindir/replace"); "$path_client_bindir/replace");
$ENV{'REPLACE'}= native_path($exe_replace); $ENV{'REPLACE'}= native_path($exe_replace);
...@@ -2347,7 +2347,7 @@ sub environment_setup { ...@@ -2347,7 +2347,7 @@ sub environment_setup {
# innochecksum # innochecksum
# ---------------------------------------------------- # ----------------------------------------------------
my $exe_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"); "$path_client_bindir/innochecksum");
if ($exe_innochecksum) if ($exe_innochecksum)
{ {
...@@ -2535,10 +2535,10 @@ sub setup_vardir() { ...@@ -2535,10 +2535,10 @@ sub setup_vardir() {
{ {
if (!$opt_embedded_server) if (!$opt_embedded_server)
{ {
for (<$bindir/storage/*$opt_vs_config/*.dll>, for (<$bindir/storage/*$multiconfig/*.dll>,
<$bindir/plugin/*$opt_vs_config/*.dll>, <$bindir/plugin/*$multiconfig/*.dll>,
<$bindir/libmariadb$opt_vs_config/*.dll>, <$bindir/libmariadb$multiconfig/*.dll>,
<$bindir/sql$opt_vs_config/*.dll>) <$bindir/sql$multiconfig/*.dll>)
{ {
my $pname=basename($_); my $pname=basename($_);
copy rel2abs($_), "$plugindir/$pname"; copy rel2abs($_), "$plugindir/$pname";
...@@ -2555,11 +2555,11 @@ sub setup_vardir() { ...@@ -2555,11 +2555,11 @@ sub setup_vardir() {
unlink "$plugindir/symlink_test"; unlink "$plugindir/symlink_test";
} }
for (<$bindir/storage/*/*.so>, for (<$bindir/storage/*$multiconfig/*.so>,
<$bindir/plugin/*/*.so>, <$bindir/plugin/*$multiconfig/*.so>,
<$bindir/libmariadb/plugins/*/*.so>, <$bindir/libmariadb/plugins/*/*.so>,
<$bindir/libmariadb/*.so>, <$bindir/libmariadb/$multiconfig/*.so>,
<$bindir/sql/*.so>) <$bindir/sql$multiconfig/*.so>)
{ {
my $pname=basename($_); my $pname=basename($_);
if ($opt_use_copy) if ($opt_use_copy)
...@@ -2681,23 +2681,24 @@ sub check_debug_support { ...@@ -2681,23 +2681,24 @@ sub check_debug_support {
# executables, and plugins - that is, something that can affect the test suite # executables, and plugins - that is, something that can affect the test suite
# #
sub fix_vs_config_dir () { sub fix_vs_config_dir () {
return $opt_vs_config="" unless IS_WINDOWS; return $multiconfig="/$multiconfig" if $multiconfig;
return $opt_vs_config="/$opt_vs_config" if $opt_vs_config;
my $modified = 1e30; my $modified = 1e30;
$opt_vs_config=""; $multiconfig="";
for (<$bindir/sql/*/mysqld.exe>) { #/ for (<$bindir/sql/*/mysqld.exe>,
<$bindir/sql/*/mysqld>
) { #/
if (-M $_ < $modified) if (-M $_ < $modified)
{ {
$modified = -M _; $modified = -M _;
$opt_vs_config = basename(dirname($_)); $multiconfig = basename(dirname($_));
} }
} }
mtr_report("VS config: $opt_vs_config"); mtr_report("VS config: $multiconfig");
$opt_vs_config="/$opt_vs_config" if $opt_vs_config; $multiconfig="/$multiconfig" if $multiconfig;
} }
...@@ -2717,9 +2718,9 @@ sub vs_config_dirs ($$) { ...@@ -2717,9 +2718,9 @@ sub vs_config_dirs ($$) {
# Don't look in these dirs when not on windows # Don't look in these dirs when not on windows
return () unless IS_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", return ("$basedir/$path_part/release/$exe",
......
...@@ -40,7 +40,7 @@ sub start_test { ...@@ -40,7 +40,7 @@ sub start_test {
my $bin=$ENV{MTR_BINDIR} || '..'; my $bin=$ENV{MTR_BINDIR} || '..';
return "Not run for embedded server" if $::opt_embedded_server; return "Not run for embedded server" if $::opt_embedded_server;
return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake"; 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`; my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`;
return "No ctest" if $?; return "No ctest" if $?;
......
...@@ -15,7 +15,7 @@ use strict; ...@@ -15,7 +15,7 @@ use strict;
my $sst_dump= my $sst_dump=
::mtr_exe_maybe_exists( ::mtr_exe_maybe_exists(
"$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", "$::bindir/storage/rocksdb$::multiconfig/sst_dump",
"$::path_client_bindir/sst_dump"); "$::path_client_bindir/sst_dump");
return "RocksDB is not compiled, no sst_dump" unless $sst_dump; return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
$ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump";
......
...@@ -13,7 +13,7 @@ use strict; ...@@ -13,7 +13,7 @@ use strict;
my $sst_dump= my $sst_dump=
::mtr_exe_maybe_exists( ::mtr_exe_maybe_exists(
"$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", "$::bindir/storage/rocksdb$::multiconfig/sst_dump",
"$::path_client_bindir/sst_dump"); "$::path_client_bindir/sst_dump");
return "RocksDB is not compiled, no sst_dump" unless $sst_dump; return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
$ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump";
......
...@@ -15,7 +15,7 @@ use strict; ...@@ -15,7 +15,7 @@ use strict;
my $sst_dump= my $sst_dump=
::mtr_exe_maybe_exists( ::mtr_exe_maybe_exists(
"$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", "$::bindir/storage/rocksdb$::multiconfig/sst_dump",
"$::path_client_bindir/sst_dump"); "$::path_client_bindir/sst_dump");
return "RocksDB is not compiled, no sst_dump" unless $sst_dump; return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
$ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump";
......
...@@ -12,7 +12,7 @@ use strict; ...@@ -12,7 +12,7 @@ use strict;
my $sst_dump= my $sst_dump=
::mtr_exe_maybe_exists( ::mtr_exe_maybe_exists(
"$::bindir/storage/rocksdb$::opt_vs_config/sst_dump", "$::bindir/storage/rocksdb$::multiconfig/sst_dump",
"$::path_client_bindir/sst_dump"); "$::path_client_bindir/sst_dump");
return "RocksDB is not compiled, no sst_dump" unless $sst_dump; return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
$ENV{MARIAROCKS_SST_DUMP}="$sst_dump"; $ENV{MARIAROCKS_SST_DUMP}="$sst_dump";
......
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