summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_misc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib/mtr_misc.pl')
-rw-r--r--mysql-test/lib/mtr_misc.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 6838435bbde..388d252502a 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -149,6 +149,28 @@ sub mtr_exe_maybe_exists (@) {
#
# NOTE! More specific paths should be given before less specific.
+#
+sub mtr_pl_maybe_exists (@) {
+ my @path= @_;
+
+ map {$_.= ".pl"} @path if IS_WINDOWS;
+ foreach my $path ( @path )
+ {
+ if(IS_WINDOWS)
+ {
+ return $path if -f $path;
+ }
+ else
+ {
+ return $path if -x $path;
+ }
+ }
+ return "";
+}
+
+
+#
+# NOTE! More specific paths should be given before less specific.
# For example /client/debug should be listed before /client
#
sub mtr_exe_exists (@) {