Skip to content

Commit 193bfdd

Browse files
MDEV-22010: use executables MariaDB named in scripts
As a part of this MDEV following changes were made: 1) Mariadb named executables used instead of mysql named executables in scripts 2) renamed mysql-test-run and mysql-stress-test to mariadb-test-run and mariadb-stress-test and created a symlink.
1 parent cb0cad8 commit 193bfdd

17 files changed

+113
-69
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ mysql-test/lib/My/SafeProcess/my_safe_process
9090
mysql-test/lib/My/SafeProcess/wsrep_check_version
9191
mysql-test/mtr
9292
mysql-test/mysql-test-run
93+
mysql-test/mariadb-test-run
94+
mysql-test/mysql-stress-test.pl
95+
mysql-test/mysql-test-run.pl
9396
mysql-test/var*
9497
mysql-test-gcov.err
9598
mysql-test-gcov.msg

debian/mariadb-test.install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ usr/share/man/man1/mariadb-client-test-embedded.1
2525
usr/share/man/man1/mariadb-client-test.1
2626
usr/share/man/man1/mariadb-test-embedded.1
2727
usr/share/man/man1/mariadb-test.1
28-
usr/share/man/man1/mysql-stress-test.pl.1
2928
usr/share/man/man1/mysql-test-run.pl.1
3029
usr/share/man/man1/mysql_client_test.1
3130
usr/share/man/man1/mysql_client_test_embedded.1
@@ -36,8 +35,9 @@ usr/share/mysql/mysql-test/README-gcov
3635
usr/share/mysql/mysql-test/README.stress
3736
usr/share/mysql/mysql-test/dgcov.pl
3837
usr/share/mysql/mysql-test/lib
39-
usr/share/mysql/mysql-test/mysql-stress-test.pl
38+
usr/share/mysql/mysql-test/mariadb-stress-test.pl
4039
usr/share/mysql/mysql-test/mysql-test-run.pl
40+
usr/share/mysql/mysql-test/mariadb-test-run.pl
4141
usr/share/mysql/mysql-test/purify.supp
4242
usr/share/mysql/mysql-test/suite.pm
4343
usr/share/mysql/mysql-test/valgrind.supp

debian/mariadb-test.links

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ usr/bin/mariadb-client-test usr/bin/mysql_client_test
22
usr/bin/mariadb-client-test-embedded usr/bin/mysql_client_test_embedded
33
usr/bin/mariadb-test usr/bin/mysqltest
44
usr/bin/mariadb-test-embedded usr/bin/mysqltest_embedded
5-
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
6-
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
5+
usr/share/mysql/mysql-test/mariadb-test-run.pl usr/share/mysql/mysql-test/mysql-test-run.pl
6+
usr/share/mysql/mysql-test/mariadb-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
7+
usr/share/mysql/mysql-test/mariadb-test-run.pl usr/share/mysql/mysql-test/mtr
8+
usr/share/mysql/mysql-test/mariadb-test-run.pl usr/share/mysql/mysql-test/mariadb-test-run

mysql-test/CMakeLists.txt

Lines changed: 51 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,63 @@ INSTALL_MYSQL_TEST("." ".")
1919
IF(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
2020
# Enable running mtr from build directory
2121
CONFIGURE_FILE(
22-
${CMAKE_CURRENT_SOURCE_DIR}/mtr.out-of-source
23-
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run.pl
22+
${CMAKE_CURRENT_SOURCE_DIR}/mtr.out-of-source
23+
${CMAKE_CURRENT_BINARY_DIR}/mariadb-test-run.pl
24+
@ONLY
25+
)
26+
CONFIGURE_FILE(
27+
${CMAKE_CURRENT_SOURCE_DIR}/mariadb-stress-test.pl
28+
${CMAKE_CURRENT_BINARY_DIR}/mariadb-stress-test.pl
2429
@ONLY
2530
)
31+
IF(WIN32)
32+
CONFIGURE_FILE(
33+
${CMAKE_CURRENT_SOURCE_DIR}/mtr.out-of-source
34+
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run.pl
35+
@ONLY)
36+
ENDIF()
2637
SET(out_of_source_build TRUE)
38+
ELSEIF(WIN32)
39+
CONFIGURE_FILE(
40+
${CMAKE_CURRENT_SOURCE_DIR}/mariadb-test-run.pl
41+
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run.pl
42+
COPYONLY)
43+
CONFIGURE_FILE(
44+
${CMAKE_CURRENT_SOURCE_DIR}/mariadb-stress-test.pl
45+
${CMAKE_CURRENT_BINARY_DIR}/mysql-stress-test.pl
46+
COPYONLY)
2747
ENDIF()
48+
2849
IF(UNIX)
2950
EXECUTE_PROCESS(
30-
COMMAND chmod +x mysql-test-run.pl
31-
COMMAND ${CMAKE_COMMAND} -E create_symlink
32-
./mysql-test-run.pl mtr
33-
COMMAND ${CMAKE_COMMAND} -E create_symlink
34-
./mysql-test-run.pl mysql-test-run
35-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
36-
)
37-
IF(INSTALL_MYSQLTESTDIR AND out_of_source_build)
38-
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr
39-
${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run
51+
COMMAND chmod +x mariadb-test-run.pl
52+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
53+
FOREACH (lnk mysql-test-run mtr mysql-test-run.pl mariadb-test-run)
54+
EXECUTE_PROCESS(
55+
COMMAND ${CMAKE_COMMAND} -E create_symlink
56+
./mariadb-test-run.pl ${lnk}
57+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
58+
59+
IF(INSTALL_MYSQLTESTDIR)
60+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${lnk}
61+
DESTINATION ${INSTALL_MYSQLTESTDIR}
62+
COMPONENT Test)
63+
ENDIF()
64+
ENDFOREACH()
65+
EXECUTE_PROCESS(
66+
COMMAND chmod +x mariadb-stress-test.pl
67+
COMMAND ${CMAKE_COMMAND} -E create_symlink
68+
./mariadb-stress-test.pl mysql-stress-test.pl
69+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
70+
)
71+
ELSE()
72+
IF(INSTALL_MYSQLTESTDIR)
73+
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mariadb-test-run.pl
74+
RENAME mysql-test-run.pl
75+
DESTINATION ${INSTALL_MYSQLTESTDIR}
76+
COMPONENT Test)
77+
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mariadb-stress-test.pl
78+
RENAME mysql-stress-test.pl
4079
DESTINATION ${INSTALL_MYSQLTESTDIR}
4180
COMPONENT Test)
4281
ENDIF()
@@ -156,4 +195,3 @@ IF (MAX_INDEXES)
156195
MESSAGE(STATUS "mysql-test/include/max_indexes.inc adjusted")
157196
ENDIF()
158197
ENDIF()
159-

mysql-test/lib/mtr_stress.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ()
136136
}
137137

138138
mtr_init_args(\$args);
139-
mtr_add_args($args, "$::glob_mysql_test_dir/mysql-stress-test.pl");
139+
mtr_add_args($args, "$::glob_mysql_test_dir/mariadb-stress-test.pl");
140140
mtr_add_arg($args, "--server-socket=%s", $::master->[0]->{'path_sock'});
141141
mtr_add_arg($args, "--server-user=%s", $::opt_user);
142142
mtr_add_arg($args, "--server-database=%s", "test");

mysql-test/lib/v1/mtr_stress.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ ()
182182
}
183183

184184
#Run stress test
185-
mtr_run("$::glob_mysql_test_dir/mysql-stress-test.pl", $args, "", "", "", "");
185+
mtr_run("$::glob_mysql_test_dir/mariadb-stress-test.pl", $args, "", "", "", "");
186186
if ( ! $::glob_use_embedded_server )
187187
{
188188
stop_all_servers();
File renamed without changes.

mysql-test/mysql-test-run.pl renamed to mysql-test/mariadb-test-run.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
BEGIN {
3737
# Check that mysql-test-run.pl is started from mysql-test/
38-
unless ( -f "mysql-test-run.pl" )
38+
unless ( -f "mariadb-test-run.pl" )
3939
{
4040
print "**** ERROR **** ",
4141
"You must start mysql-test-run from the mysql-test/ directory\n";
@@ -57,10 +57,10 @@ BEGIN
5757
if ( $version == 1 )
5858
{
5959
print "=======================================================\n";
60-
print " WARNING: Using mysql-test-run.pl version 1! \n";
60+
print " WARNING: Using mariadb-test-run.pl version 1! \n";
6161
print "=======================================================\n";
6262
# Should use exec() here on *nix but this appears not to work on Windows
63-
exit(system($^X, "lib/v1/mysql-test-run.pl", @ARGV) >> 8);
63+
exit(system($^X, "lib/v1/mariadb-test-run.pl", @ARGV) >> 8);
6464
}
6565
elsif ( $version == 2 )
6666
{
@@ -69,7 +69,7 @@ BEGIN
6969
}
7070
else
7171
{
72-
print "ERROR: Version $version of mysql-test-run does not exist!\n";
72+
print "ERROR: Version $version of mariadb-test-run does not exist!\n";
7373
exit(1);
7474
}
7575
}

mysql-test/mtr.out-of-source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Call mtr in out-of-source build
33
$ENV{MTR_BINDIR} = '@CMAKE_BINARY_DIR@';
44
chdir('@CMAKE_SOURCE_DIR@/mysql-test');
5-
exit(system($^X, '@CMAKE_SOURCE_DIR@/mysql-test/mysql-test-run.pl', @ARGV) >> 8);
5+
exit(system($^X, '@CMAKE_SOURCE_DIR@/mysql-test/mariadb-test-run.pl', @ARGV) >> 8);

mysql-test/suite/stress/t/wrapper.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ EOF
2020
--source $MYSQL_TMP_DIR/mtest.inc
2121
--remove_file $MYSQL_TMP_DIR/mtest.inc
2222

23-
exec perl mysql-stress-test.pl --mysqltest=$MYSQLTEST_BIN
23+
exec perl mariadb-stress-test.pl --mysqltest=$MYSQLTEST_BIN
2424
--server-port=$MASTER_MYPORT --server-socket=$MASTER_MYSOCK
2525
--server-user=root --cleanup
2626
--server-logs-dir=$MYSQLTEST_VARDIR/log

0 commit comments

Comments
 (0)