Re: cvs: php-src(PHP_5_3) / run-tests.php

From: Date: Fri, 20 Jun 2008 12:17:58 +0000
Subject: Re: cvs: php-src(PHP_5_3) / run-tests.php
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-50504@lists.php.net to get a copy of this message
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


« previous php.cvs (#50504) next »