From f9fc0ccfd457832d9f2e03b606b87b4ace0ed76f Mon Sep 17 00:00:00 2001 From: rurban Date: Mon, 4 Oct 2004 23:45:28 +0000 Subject: [PATCH] fix for latest cygwin php git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4016 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- tests/unit/test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test.php b/tests/unit/test.php index 3bcbcf0b4..87a80acea 100644 --- a/tests/unit/test.php +++ b/tests/unit/test.php @@ -245,7 +245,9 @@ class phpwiki_TestCase extends PHPUnit_TestCase { $request->_args = $this->_savedargs; if (DEBUG & _DEBUG_TRACE) { echo "-- MEMORY USAGE: "; - if (function_exists('memory_get_usage')) { + if (isWindows()) { // requires a newer cygwin + echo `cat /proc/meminfo | grep Mem:|perl -ane"print \$F[2];"`,"\n"; + } elseif (function_exists('memory_get_usage')) { echo memory_get_usage(),"\n"; } elseif (function_exists('getrusage')) { $u = getrusage(); @@ -253,8 +255,6 @@ class phpwiki_TestCase extends PHPUnit_TestCase { } elseif (!isWindows()) { // only on unix, not on cygwin: $pid = getmypid(); echo `ps -eo%mem,rss,pid | grep $pid`,"\n"; - } else { // requires a newer cygwin - echo `cat /proc/meminfo | grep Mem:|perl -ane"print \$F[2];"`,"\n"; } flush(); } -- 2.45.0