List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:September 29 2010 11:06am
Subject:bzr commit into mysql-5.1-mtr branch (bjorn.munch:2937) Bug#52828
View as plain text  
#At file:///home/bm136801/my/perlpath-51/ based on revid:bjorn.munch@stripped

 2937 Bjorn Munch	2010-09-29
      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

    modified:
      client/mysqltest.cc
      mysql-test/mysql-test-run.pl
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-09-29 10:56:10 +0000
+++ b/client/mysqltest.cc	2010-09-29 11:03:53 +0000
@@ -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;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2010-09-28 13:58:01 +0000
+++ b/mysql-test/mysql-test-run.pl	2010-09-29 11:03:53 +0000
@@ -3583,6 +3583,9 @@ sub run_testcase ($) {
 	# Try to get reason from test log file
 	find_testcase_skipped_reason($tinfo);
 	mtr_report_test_skipped($tinfo);
+	# Restart if skipped due to missing perl, it may have had side effects
+	stop_all_servers($opt_shutdown_timeout)
+	  if ($tinfo->{'comment'} =~ /^perl not found/);
       }
       elsif ( $res == 65 )
       {


Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20100929110353-6p2v60mai6b9chme.bundle
Thread
bzr commit into mysql-5.1-mtr branch (bjorn.munch:2937) Bug#52828Bjorn Munch29 Sep