Skip to content

Commit

Permalink
Add memory check to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Dec 29, 2018
1 parent a2cb822 commit 222fa03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Zend/tests/bug55509.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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--
Expand Down

0 comments on commit 222fa03

Please sign in to comment.