diff options
author | Magnus Svensson <msvensson@mysql.com> | 2008-11-14 09:45:32 +0100 |
---|---|---|
committer | Magnus Svensson <msvensson@mysql.com> | 2008-11-14 09:45:32 +0100 |
commit | b454d067cb25457c27c6ed97fd0146f046553318 (patch) | |
tree | 3ceb482069ba149b742be8faf4a9792051c888bc /mysql-test/mysql-test-run.pl | |
parent | 6be5398f3b5a7b54f89c0520beabc651faa8dd45 (diff) | |
download | mariadb-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-x | mysql-test/mysql-test-run.pl | 26 |
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 |