summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_report.pm
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2016-09-10 17:50:32 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2016-09-10 17:50:32 +0200
commit577f3c1dce2011f51a01811fabd4ebd4e6f4d1ed (patch)
tree0668753658a84cdbc0f0deb7e388a8f83221f219 /mysql-test/lib/mtr_report.pm
parent6c74ef8ae9cdfedb20827694362cad0fccaa5880 (diff)
downloadmariadb-git-577f3c1dce2011f51a01811fabd4ebd4e6f4d1ed.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_report.pm')
-rw-r--r--mysql-test/lib/mtr_report.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index 9ab82c454ed..97ace54f0fb 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -34,7 +34,6 @@ use mtr_match;
use My::Platform;
use POSIX qw[ _exit ];
use IO::Handle qw[ flush ];
-require "mtr_io.pl";
use mtr_results;
my $tot_real_time= 0;
@@ -92,7 +91,7 @@ sub mtr_report_test_passed ($) {
my $timer_str= "";
if ( $timer and -f "$::opt_vardir/log/timer" )
{
- $timer_str= mtr_fromfile("$::opt_vardir/log/timer");
+ $timer_str= ::mtr_fromfile("$::opt_vardir/log/timer");
$tinfo->{timer}= $timer_str;
resfile_test_info('duration', $timer_str) if $::opt_resfile;
}