summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-09-30 12:42:37 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2010-09-30 12:42:37 +0200
commitbe7b3c004066fba276471df861ffb6d90c88a883 (patch)
treea3c00296b1f1b4b61f6d9d5de4b6e61f94d153e0 /client
parent9ec472486608a0fb1a5ea6fa31ad8f1f2927f1c7 (diff)
downloadmariadb-git-be7b3c004066fba276471df861ffb6d90c88a883.tar.gz
Bug #52828 Tests that use perl fail when perl is not in path
Trying to run perl fails, just like it does when perl is started but fails Trap the case that perl was not found/could not be started, and skip test Also force a restart of servers since test may already have done something mtr now also appends path of current perl to PATH to aid mysqltest
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 89ba739a9ef..7d335b7d47a 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -3853,7 +3853,18 @@ void do_perl(struct st_command *command)
if (!error)
my_delete(temp_file_path, MYF(0));
- handle_command_error(command, WEXITSTATUS(error));
+ /* Check for error code that indicates perl could not be started */
+ int exstat= WEXITSTATUS(error);
+#ifdef __WIN__
+ if (exstat == 1)
+ /* Text must begin 'perl not found' as mtr looks for it */
+ abort_not_supported_test("perl not found in path or did not start");
+#else
+ if (exstat == 127)
+ abort_not_supported_test("perl not found in path");
+#endif
+ else
+ handle_command_error(command, exstat);
}
dynstr_free(&ds_delimiter);
DBUG_VOID_RETURN;