Hi Nuno,
+
+ $timeout = $leak_check ? 300 : (isset($env['TEST_TIMEOUT']) ?
$env['TEST_TIMEOUT'] : 60);
I don't particularly like this semantic, as that way I can't set the
timeout when using valgrind. A better way would be (IMHO):
$timeout = isset($env['TEST_TIMEOUT']) ? $env['TEST_TIMEOUT'] :
($leak_check ? 300 : 60);
OK... I'm investigating whether this will work reliably or be
order-dependant, see below...
Also, maybe it's time to put the timeout value computation outside of the
function, otherwise that's two ifs for each test execution + skipif
execution.
I'm afraid we're stuck with that, unless we want to actually have the
calculation in two different places:
case 'm':
$leak_check = true;
$valgrind_cmd = "valgrind --version";
$valgrind_header = system_with_timeout($valgrind_cmd);
Anyway this seems a great addition, as now I can fine tune the timeout
without editing the script by hand.
I'm just happy to be able to get out of those 10-minute tests :)
- Steph
Nuno
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php