mariadb/mysql-test/include/truncate_file.inc
Sergei Golubchik 1300627a5d 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
2017-12-27 23:17:28 +01:00

11 lines
224 B
PHP

# truncate a giving file, all contents of the file are be cleared
if (!$TRUNCATE_FILE)
{
die TRUNCATE_FILE is not set;
}
perl;
open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
close FILE;
EOF