Blame SOURCES/mysql-sharedir.patch

2aefdf
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
2aefdf
index f77bd022..a3a3bd9f 100644
2aefdf
--- a/mysql-test/CMakeLists.txt
2aefdf
+++ b/mysql-test/CMakeLists.txt
2aefdf
@@ -57,6 +57,9 @@ IF(INSTALL_MYSQLTESTDIR)
2aefdf
 ENDIF()
2aefdf
 
2aefdf
 
2aefdf
+# Expand some paths in the perl script correctly
2aefdf
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql-test-run.pl ${CMAKE_CURRENT_SOURCE_DIR}/mysql-test-run.pl @ONLY)
2aefdf
+
2aefdf
 IF(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
2aefdf
   # Enable running mtr from build directory
2aefdf
   FIND_PROGRAM(PERL_EXECUTABLE perl
2aefdf
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
2aefdf
index b82611fd..7fc5987e 100755
2aefdf
--- a/mysql-test/mysql-test-run.pl
2aefdf
+++ b/mysql-test/mysql-test-run.pl
2aefdf
@@ -1656,7 +1656,7 @@ sub command_line_setup {
2aefdf
   my $path_share = $path_language;
2aefdf
 
2aefdf
   @share_locations =
2aefdf
-    ("share/mysql-" . $mysql_base_version, "share/mysql", "share");
2aefdf
+    ("@INSTALL_MYSQLSHAREDIR@", "share/mysql-" . $mysql_base_version, "share/mysql", "share");
2aefdf
 
2aefdf
   $path_charsetsdir = my_find_dir($basedir, \@share_locations, "charsets");
2aefdf