Add memory check to the test

This commit is contained in:
Anatol Belski 2018-12-29 16:22:31 +01:00
parent a2cb8228fe
commit 222fa032d2

View File

@ -45,6 +45,13 @@ elseif (PHP_OS == 'FreeBSD') {
if ($freeMemory < 2100*1024*1024) {
die('skip Not enough memory.');
}
} elseif (PHP_OS == "WINNT") {
$s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nil"));
$freeMemory = explode('=', $s)[1]*1;
if ($freeMemory < 2.1*1024*1024) {
die('skip Not enough memory.');
}
}
?>
--INI--