summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2008-11-14 09:45:32 +0100
committerMagnus Svensson <msvensson@mysql.com>2008-11-14 09:45:32 +0100
commitb454d067cb25457c27c6ed97fd0146f046553318 (patch)
tree3ceb482069ba149b742be8faf4a9792051c888bc /mysql-test/mysql-test-run.pl
parent6be5398f3b5a7b54f89c0520beabc651faa8dd45 (diff)
downloadmariadb-git-b454d067cb25457c27c6ed97fd0146f046553318.tar.gz
WL#4189 Add full backward compatibility to mysql-test-run.pl
- Add copy of mtr v1 and make it possible to run it using MTR_VERSION=1
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 415b4f646a1..69e0189a6f5 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -34,8 +34,34 @@ BEGIN {
}
}
+BEGIN {
+ # Check backward compatibility support
+ # By setting the environment variable MTR_VERSION
+ # it's possible to use a previous version of
+ # mysql-test-run.pl
+ my $version= $ENV{MTR_VERSION} || 2;
+ if ( $version == 1 )
+ {
+ print "=======================================================\n";
+ print " WARNING: Using mysql-test-run.pl version 1! \n";
+ print "=======================================================\n";
+ require "lib/v1/mysql-test-run.pl";
+ exit(1);
+ }
+ elsif ( $version == 2 )
+ {
+ # This is the current version, just continue
+ ;
+ }
+ else
+ {
+ print "ERROR: Version $version of mysql-test-run does not exist!\n";
+ exit(1);
+ }
+}
use lib "lib";
+
use Cwd;
use Getopt::Long;
use My::File::Path; # Patched version of File::Path