summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-04-27 16:32:40 +0200
committerunknown <msvensson@shellback.(none)>2006-04-27 16:32:40 +0200
commit1bdc15e10023f4d46c45517c61138fa721ee9ded (patch)
tree82ce0e2ddc929afcb7f738cf15f1720d5aad8250 /mysql-test/lib
parent2f4f68be5318117f468644c612c022ceb657d9d3 (diff)
downloadmariadb-git-1bdc15e10023f4d46c45517c61138fa721ee9ded.tar.gz
Add test to mysql-test-run.pl to see if the udf_example.so is availble. Set envioronment variable UDF_EXAMPLE_LIB if it is.
Then check in have_udf if that variable is set. Finally use tahe variable when loading the shared library. mysql-test/include/have_udf.inc: Add check if udf_example.so(or similar) is available mysql-test/lib/mtr_misc.pl: Add funcion "mtr_file_exist" to search for files mysql-test/mysql-test-run.pl: Add checks to find the udf_example.so library mysql-test/r/udf.result: Update result mysql-test/t/disabled.def: Remove udf.test from disabled tests mysql-test/t/udf.test: Use variable UDF_EXAMPLE_LIB when looking for shared library to load mysql-test/r/have_udf_example.require: New BitKeeper file ``mysql-test/r/have_udf_example.require''
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_misc.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 90617194897..7676401f08e 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -12,6 +12,7 @@ sub mtr_init_args ($);
sub mtr_add_arg ($$@);
sub mtr_path_exists(@);
sub mtr_script_exists(@);
+sub mtr_file_exists(@);
sub mtr_exe_exists(@);
sub mtr_copy_dir($$);
sub mtr_same_opts($$);
@@ -94,6 +95,21 @@ sub mtr_script_exists (@) {
}
}
+sub mtr_file_exists (@) {
+ foreach my $path ( @_ )
+ {
+ return $path if -e $path;
+ }
+ if ( @_ == 1 )
+ {
+ mtr_error("Could not find $_[0]");
+ }
+ else
+ {
+ mtr_error("Could not find any of " . join(" ", @_));
+ }
+}
+
sub mtr_exe_exists (@) {
my @path= @_;
map {$_.= ".exe"} @path if $::glob_win32;