Newsgroups: php.internals,php.qa Path: news.php.net Xref: news.php.net php.internals:55055 php.qa:65911 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24960 invoked from network); 1 Sep 2011 12:06:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2011 12:06:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:64181] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/73-03466-E257F5E4 for ; Thu, 01 Sep 2011 08:06:16 -0400 Received: from [192.168.2.230] (ppp-93-104-32-107.dynamic.mnet-online.de [93.104.32.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 80CED778A4; Thu, 1 Sep 2011 14:05:58 +0200 (CEST) To: Hannes Magnusson Cc: PHP Development , PHP QA In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 01 Sep 2011 14:05:53 +0200 Message-ID: <1314878753.1211.0.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New run-tests.php feature From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Thu, 2011-09-01 at 13:35 +0200, Hannes Magnusson wrote: > Throw qa and internals@ into the loop to. > > I'd also like to move the XFAIL section (printed out in the end) above > the FAIL section. > We have bucketloads of xfailed tests, I actually have to scroll up to > see the failed tests which is really annoying and silly. Good thing to do! johannes > Anyone have strong opinion on the printout order? > > -Hannes > > > ---------- Forwarded message ---------- > From: Hannes Magnusson > Date: Thu, Sep 1, 2011 at 13:32 > Subject: Re: [PHP-CVS] svn: /php/php-src/ > branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php > trunk/run-tests.php > To: Pierre Joye > Cc: php-cvs@lists.php.net > > > I did want to use -v at first, but that has a completely different > meaning already. > Its really only useful when looking at what is going on in a single > testcase to debug run-tests :] > > -Hannes > > On Thu, Sep 1, 2011 at 13:26, Pierre Joye wrote: > > ah right, I miss this part of the patch. I would suggest -v instead > > and add a level of verbosity (less means no output but failed tests > > for example). > > > > On Thu, Sep 1, 2011 at 1:13 PM, Hannes Magnusson wrote: > >> It is, -g > >> > >> so, you can either do $ SHOW_ONLY_GROUPS=FAIL,WARN make test > >> or via run-tets, $ TEST_PHP_EXECUTABLE=auto php run-tests.php -g XFAIL,SKIP > >> > >> -Hannes > >> > >> > >> On Thu, Sep 1, 2011 at 13:06, Pierre Joye wrote: > >>> good idea! > >>> > >>> please add it as a command line option as well, maybe using a verbose option > >>> > >>> On Thu, Sep 1, 2011 at 1:00 PM, Hannes Magnusson wrote: > >>>> bjori Thu, 01 Sep 2011 11:00:51 +0000 > >>>> > >>>> Revision: http://svn.php.net/viewvc?view=revision&revision=315967 > >>>> > >>>> Log: > >>>> Seeing thousands of PASS tests flying by is meaningless. > >>>> Add an option to only print certain result groups. > >>>> > >>>> Changed paths: > >>>> U php/php-src/branches/PHP_5_3/run-tests.php > >>>> U php/php-src/branches/PHP_5_4/run-tests.php > >>>> U php/php-src/trunk/run-tests.php > >>>> > >>>> Modified: php/php-src/branches/PHP_5_3/run-tests.php > >>>> =================================================================== > >>>> --- php/php-src/branches/PHP_5_3/run-tests.php 2011-09-01 10:16:21 UTC (rev 315966) > >>>> +++ php/php-src/branches/PHP_5_3/run-tests.php 2011-09-01 11:00:51 UTC (rev 315967) > >>>> @@ -207,6 +207,12 @@ > >>>> $DETAILED = 0; > >>>> } > >>>> > >>>> +if (getenv('SHOW_ONLY_GROUPS')) { > >>>> + $SHOW_ONLY_GROUPS = explode(",", getenv('SHOW_ONLY_GROUPS')); > >>>> +} else { > >>>> + $SHOW_ONLY_GROUPS = array(); > >>>> +} > >>>> + > >>>> // Check whether user test dirs are requested. > >>>> if (getenv('TEST_PHP_USER')) { > >>>> $user_tests = explode (',', getenv('TEST_PHP_USER')); > >>>> @@ -560,6 +566,9 @@ > >>>> case 'd': > >>>> $ini_overwrites[] = $argv[++$i]; > >>>> break; > >>>> + case 'g': > >>>> + $SHOW_ONLY_GROUPS = explode(",", $argv[++$i]);; > >>>> + break; > >>>> //case 'h' > >>>> case '--keep-all': > >>>> foreach($cfgfiles as $file) { > >>>> @@ -675,6 +684,9 @@ > >>>> -d foo=bar Pass -d option to the php binary (Define INI entry foo > >>>> with value 'bar'). > >>>> > >>>> + -g Comma seperated list of groups to show during test run > >>>> + (e.x. FAIL,SKIP). > >>>> + > >>>> -m Test for memory leaks with Valgrind. > >>>> > >>>> -p Specify PHP executable to run. > >>>> @@ -2426,16 +2438,24 @@ > >>>> function show_test($test_idx, $shortname) > >>>> { > >>>> global $test_cnt; > >>>> + global $line_length; > >>>> > >>>> - echo "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $str = "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $line_length = strlen($str); > >>>> + echo $str; > >>>> flush(); > >>>> } > >>>> > >>>> function show_result($result, $tested, $tested_file, $extra = '', $temp_filenames = null) > >>>> { > >>>> - global $html_output, $html_file, $temp_target, $temp_urlbase; > >>>> + global $html_output, $html_file, $temp_target, $temp_urlbase, $line_length, $SHOW_ONLY_GROUPS; > >>>> > >>>> - echo "$result $tested [$tested_file] $extra\n"; > >>>> + if (!$SHOW_ONLY_GROUPS || in_array($result, $SHOW_ONLY_GROUPS)) { > >>>> + echo "$result $tested [$tested_file] $extra\n"; > >>>> + } else { > >>>> + // Write over the last line to avoid random trailing chars on next echo > >>>> + echo str_repeat(" ", $line_length), "\r"; > >>>> + } > >>>> > >>>> if ($html_output) { > >>>> > >>>> > >>>> Modified: php/php-src/branches/PHP_5_4/run-tests.php > >>>> =================================================================== > >>>> --- php/php-src/branches/PHP_5_4/run-tests.php 2011-09-01 10:16:21 UTC (rev 315966) > >>>> +++ php/php-src/branches/PHP_5_4/run-tests.php 2011-09-01 11:00:51 UTC (rev 315967) > >>>> @@ -207,6 +207,12 @@ > >>>> $DETAILED = 0; > >>>> } > >>>> > >>>> +if (getenv('SHOW_ONLY_GROUPS')) { > >>>> + $SHOW_ONLY_GROUPS = explode(",", getenv('SHOW_ONLY_GROUPS')); > >>>> +} else { > >>>> + $SHOW_ONLY_GROUPS = array(); > >>>> +} > >>>> + > >>>> // Check whether user test dirs are requested. > >>>> if (getenv('TEST_PHP_USER')) { > >>>> $user_tests = explode (',', getenv('TEST_PHP_USER')); > >>>> @@ -560,6 +566,9 @@ > >>>> case 'd': > >>>> $ini_overwrites[] = $argv[++$i]; > >>>> break; > >>>> + case 'g': > >>>> + $SHOW_ONLY_GROUPS = explode(",", $argv[++$i]);; > >>>> + break; > >>>> //case 'h' > >>>> case '--keep-all': > >>>> foreach($cfgfiles as $file) { > >>>> @@ -675,6 +684,9 @@ > >>>> -d foo=bar Pass -d option to the php binary (Define INI entry foo > >>>> with value 'bar'). > >>>> > >>>> + -g Comma seperated list of groups to show during test run > >>>> + (e.x. FAIL,SKIP). > >>>> + > >>>> -m Test for memory leaks with Valgrind. > >>>> > >>>> -p Specify PHP executable to run. > >>>> @@ -2426,16 +2438,24 @@ > >>>> function show_test($test_idx, $shortname) > >>>> { > >>>> global $test_cnt; > >>>> + global $line_length; > >>>> > >>>> - echo "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $str = "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $line_length = strlen($str); > >>>> + echo $str; > >>>> flush(); > >>>> } > >>>> > >>>> function show_result($result, $tested, $tested_file, $extra = '', $temp_filenames = null) > >>>> { > >>>> - global $html_output, $html_file, $temp_target, $temp_urlbase; > >>>> + global $html_output, $html_file, $temp_target, $temp_urlbase, $line_length, $SHOW_ONLY_GROUPS; > >>>> > >>>> - echo "$result $tested [$tested_file] $extra\n"; > >>>> + if (!$SHOW_ONLY_GROUPS || in_array($result, $SHOW_ONLY_GROUPS)) { > >>>> + echo "$result $tested [$tested_file] $extra\n"; > >>>> + } else { > >>>> + // Write over the last line to avoid random trailing chars on next echo > >>>> + echo str_repeat(" ", $line_length), "\r"; > >>>> + } > >>>> > >>>> if ($html_output) { > >>>> > >>>> > >>>> Modified: php/php-src/trunk/run-tests.php > >>>> =================================================================== > >>>> --- php/php-src/trunk/run-tests.php 2011-09-01 10:16:21 UTC (rev 315966) > >>>> +++ php/php-src/trunk/run-tests.php 2011-09-01 11:00:51 UTC (rev 315967) > >>>> @@ -207,6 +207,12 @@ > >>>> $DETAILED = 0; > >>>> } > >>>> > >>>> +if (getenv('SHOW_ONLY_GROUPS')) { > >>>> + $SHOW_ONLY_GROUPS = explode(",", getenv('SHOW_ONLY_GROUPS')); > >>>> +} else { > >>>> + $SHOW_ONLY_GROUPS = array(); > >>>> +} > >>>> + > >>>> // Check whether user test dirs are requested. > >>>> if (getenv('TEST_PHP_USER')) { > >>>> $user_tests = explode (',', getenv('TEST_PHP_USER')); > >>>> @@ -560,6 +566,9 @@ > >>>> case 'd': > >>>> $ini_overwrites[] = $argv[++$i]; > >>>> break; > >>>> + case 'g': > >>>> + $SHOW_ONLY_GROUPS = explode(",", $argv[++$i]);; > >>>> + break; > >>>> //case 'h' > >>>> case '--keep-all': > >>>> foreach($cfgfiles as $file) { > >>>> @@ -675,6 +684,9 @@ > >>>> -d foo=bar Pass -d option to the php binary (Define INI entry foo > >>>> with value 'bar'). > >>>> > >>>> + -g Comma seperated list of groups to show during test run > >>>> + (e.x. FAIL,SKIP). > >>>> + > >>>> -m Test for memory leaks with Valgrind. > >>>> > >>>> -p Specify PHP executable to run. > >>>> @@ -2426,16 +2438,24 @@ > >>>> function show_test($test_idx, $shortname) > >>>> { > >>>> global $test_cnt; > >>>> + global $line_length; > >>>> > >>>> - echo "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $str = "TEST $test_idx/$test_cnt [$shortname]\r"; > >>>> + $line_length = strlen($str); > >>>> + echo $str; > >>>> flush(); > >>>> } > >>>> > >>>> function show_result($result, $tested, $tested_file, $extra = '', $temp_filenames = null) > >>>> { > >>>> - global $html_output, $html_file, $temp_target, $temp_urlbase; > >>>> + global $html_output, $html_file, $temp_target, $temp_urlbase, $line_length, $SHOW_ONLY_GROUPS; > >>>> > >>>> - echo "$result $tested [$tested_file] $extra\n"; > >>>> + if (!$SHOW_ONLY_GROUPS || in_array($result, $SHOW_ONLY_GROUPS)) { > >>>> + echo "$result $tested [$tested_file] $extra\n"; > >>>> + } else { > >>>> + // Write over the last line to avoid random trailing chars on next echo > >>>> + echo str_repeat(" ", $line_length), "\r"; > >>>> + } > >>>> > >>>> if ($html_output) { > >>>> > >>>> > >>>> > >>>> -- > >>>> PHP CVS Mailing List (http://www.php.net/) > >>>> To unsubscribe, visit: http://www.php.net/unsub.php > >>>> > >>> > >>> > >>> > >>> -- > >>> Pierre > >>> > >>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > >>> > >> > > > > > > > > -- > > Pierre > > > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > > > -- > > PHP CVS Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >