Blame SOURCES/mysql-sharedir.patch

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