summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-06-21 02:21:52 +0200
committerunknown <kent@mysql.com>2005-06-21 02:21:52 +0200
commite74d5313738d853dd7108aeab12db96bfc26b489 (patch)
tree0eb377d4417ba2dc01299e4c251521d9087fdbb5 /mysql-test/lib
parente17de6ecb472e84c7f826f6ac77c236ce952b9a8 (diff)
downloadmariadb-git-e74d5313738d853dd7108aeab12db96bfc26b489.tar.gz
mysql-test-run.pl:
More compact and safe handling of path names. Support for running in Windows source tree. Use libtool wrapper, instead of messing with library path names, and objects in .libs dir. mtr_misc.pl: Utility function that search aand check path names mtr_report.pl: Patch by Carsten, set correct reject/result/eval if not main suite mysql-test/lib/mtr_report.pl: Patch by Carsten, set correct reject/result/eval if not main suite mysql-test/lib/mtr_misc.pl: Utility function that search aand check path names mysql-test/mysql-test-run.pl: More compact and safe handling of path names. Support for running in Windows source tree. Use libtool wrapper, instead of messing with library path names, and objects in .libs dir.
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_misc.pl52
-rw-r--r--mysql-test/lib/mtr_report.pl7
2 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index efa1b3bec21..aba6f78c9de 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -9,6 +9,9 @@ use strict;
sub mtr_full_hostname ();
sub mtr_init_args ($);
sub mtr_add_arg ($$);
+sub mtr_path_exists(@);
+sub mtr_script_exists(@);
+sub mtr_exe_exists(@);
##############################################################################
#
@@ -47,4 +50,53 @@ sub mtr_add_arg ($$) {
push(@$args, sprintf($format, @fargs));
}
+##############################################################################
+
+sub mtr_path_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_script_exists (@) {
+ foreach my $path ( @_ )
+ {
+ return $path if -x $path;
+ }
+ if ( @_ == 1 )
+ {
+ mtr_error("Could not find $_[0]");
+ }
+ else
+ {
+ mtr_error("Could not find any of " . join(" ", @_));
+ }
+}
+
+sub mtr_exe_exists (@) {
+ foreach my $path ( @_ )
+ {
+ $path.= ".exe" if $::opt_win32;
+ return $path if -x $path;
+ }
+ if ( @_ == 1 )
+ {
+ mtr_error("Could not find $_[0]");
+ }
+ else
+ {
+ mtr_error("Could not find any of " . join(" ", @_));
+ }
+}
+
+
1;
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index a258d139bb1..0af34d11a3f 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -38,6 +38,13 @@ sub mtr_show_failed_diff ($) {
my $result_file= "r/$tname.result";
my $eval_file= "r/$tname.eval";
+ if ( $::opt_suite ne "main" )
+ {
+ $reject_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$reject_file";
+ $result_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$result_file";
+ $eval_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$eval_file";
+ }
+
if ( -f $eval_file )
{
$result_file= $eval_file;