diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ea53e47..d048384 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4999,6 +4999,24 @@ a file name for --log-bin-index option", opt_binlog_index_name);
       }
       my_afree(tmp_path);
 
+
+      // add scripts to PATH for mysql-test-run to find wsrep
+      // script names
+      char* const tmp_path2= (char*)my_alloca(strlen(mysql_home) +
+                                             strlen("/scripts") + 1);
+      if (tmp_path2)
+      {
+        strcpy(tmp_path2, mysql_home);
+        strcat(tmp_path2, "/scripts");
+        wsrep_prepend_PATH(tmp_path2);
+      }
+      else
+      {
+        WSREP_ERROR("Could not append %s/scripts to PATH", mysql_home);
+      }
+
+      my_afree(tmp_path2);
+
       if (wsrep_before_SE())
       {
         set_ports(); // this is also called in network_init() later but we need
