diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2016-09-10 17:50:32 +0200 |
---|---|---|
committer | Otto Kekäläinen <otto@mariadb.org> | 2016-11-20 14:52:49 +0200 |
commit | f77bd5faf53fe89f3ad7fe53bb0cee44ddfb1cec (patch) | |
tree | 8ac6decb8a3dd160472050ae89df365d9a6b61e0 /mysql-test/lib/mtr_cases.pm | |
parent | d49cffa124199a056ba8d4e97bb6c36084aa1fd7 (diff) | |
download | mariadb-git-f77bd5faf53fe89f3ad7fe53bb0cee44ddfb1cec.tar.gz |
Fix use of `require` in mysql-test-run.
The motivation for this is that Perl is moving towards not having
current directory ./ in @INC by default. This is causing
mysql-test-run.pl to fail in latest Debian Unstable:
https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
However, we have `use "lib"`, there is no need for current directory
in @INC, except for a gross hack. In mtr_cases.pm, there is a
`require "mtr_misc.pl"`, which hides mtr_misc.pl away in mtr_cases
namespace. And things only work because mysql-test-run.pl loads it
with a different name, `require "lib/mtr_misc.pl"`! (Perl will
`require` only once for each unique filename).
Fix this by only using `require` in main program, and referencing
functions with :: scope from other namespaces. For multi-use in
different namespaces, proper `use` modules should be used.
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
Diffstat (limited to 'mysql-test/lib/mtr_cases.pm')
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 2be903abf42..d758b81c1c7 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -58,8 +58,6 @@ use My::Test; use My::Find; use My::Suite; -require "mtr_misc.pl"; - # locate plugin suites, depending on whether it's a build tree or installed my @plugin_suitedirs; my $plugin_suitedir_regex; @@ -1096,7 +1094,7 @@ sub get_tags_from_file($$) { $file_to_tags{$file}= $tags; $file_to_master_opts{$file}= $master_opts; $file_to_slave_opts{$file}= $slave_opts; - $file_combinations{$file}= [ uniq(@combinations) ]; + $file_combinations{$file}= [ ::uniq(@combinations) ]; $file_in_overlay{$file} = 1 if $in_overlay; return @{$tags}; } |