1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-14309 MTR tests require perl-Env which is not always in the default installation

* don't use Env module in tests, use $ENV{xxx} instead
* collateral changes:
** $file in the error message was unset
** $file in the other error message was unset too :)
** source file arguments are conventionally upper-cased
** abort the test (die) on error, don't just echo/exit
This commit is contained in:
Sergei Golubchik
2017-12-27 22:10:17 +01:00
parent 462808f3b6
commit 1300627a5d
2 changed files with 4 additions and 9 deletions

View File

@ -1,16 +1,11 @@
# truncate a giving file, all contents of the file are be cleared
if (!$file)
if (!$TRUNCATE_FILE)
{
--echo Please assign a file name to $file!!
exit;
die TRUNCATE_FILE is not set;
}
let TRUNCATE_FILE= $file;
perl;
use Env;
Env::import('TRUNCATE_FILE');
open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
close FILE;
EOF