[PHP-CVS] cvs: php-src / run-tests.php
dsp Tue Jul 7 23:04:45 2009 UTC Modified files: /php-srcrun-tests.php Log: Reset TZ environment variable. Some tests assume that it's not set. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.398&r2=1.399&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.398 php-src/run-tests.php:1.399 --- php-src/run-tests.php:1.398 Wed May 20 09:22:24 2009 +++ php-src/run-tests.php Tue Jul 7 23:04:45 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.398 2009/05/20 09:22:24 lbarnaud Exp $ */ +/* $Id: run-tests.php,v 1.399 2009/07/07 23:04:45 dsp Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -634,7 +634,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.398 $' . "\n"; + echo '$Revision: 1.399 $' . "\n"; exit(1); default: @@ -1379,6 +1379,7 @@ $env['REQUEST_METHOD'] = ''; $env['CONTENT_TYPE']= ''; $env['CONTENT_LENGTH'] = ''; + $env['TZ'] = ''; if (!empty($section_text['ENV'])) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
lbarnaudWed May 20 09:22:24 2009 UTC Modified files: /php-srcrun-tests.php Log: set default value of "precision" ini setting, many tests depend on this http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.397&r2=1.398&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.397 php-src/run-tests.php:1.398 --- php-src/run-tests.php:1.397 Mon May 18 14:07:59 2009 +++ php-src/run-tests.php Wed May 20 09:22:24 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.397 2009/05/18 14:07:59 bjori Exp $ */ +/* $Id: run-tests.php,v 1.398 2009/05/20 09:22:24 lbarnaud Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -230,6 +230,7 @@ 'auto_append_file=', 'magic_quotes_runtime=0', 'ignore_repeated_errors=0', + 'precision=14', 'unicode.runtime_encoding=ISO-8859-1', 'unicode.script_encoding=UTF-8', 'unicode.output_encoding=UTF-8', @@ -633,7 +634,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.397 $' . "\n"; + echo '$Revision: 1.398 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
bjori Mon May 18 14:07:59 2009 UTC Modified files: /php-srcrun-tests.php Log: Print out the WARNed section (contains f.e. passing XFAIL tests) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.396&r2=1.397&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.396 php-src/run-tests.php:1.397 --- php-src/run-tests.php:1.396 Sat Apr 25 17:12:56 2009 +++ php-src/run-tests.php Mon May 18 14:07:59 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.396 2009/04/25 17:12:56 jani Exp $ */ +/* $Id: run-tests.php,v 1.397 2009/05/18 14:07:59 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -633,7 +633,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.396 $' . "\n"; + echo '$Revision: 1.397 $' . "\n"; exit(1); default: @@ -2254,6 +2254,19 @@ $failed_test_summary .= "=\n"; } + if (count($PHP_FAILED_TESTS['WARNED'])) { + $failed_test_summary .= ' += +WARNED TEST SUMMARY +- +'; + foreach ($PHP_FAILED_TESTS['WARNED'] as $failed_test_data) { + $failed_test_summary .= $failed_test_data['test_name'] . $failed_test_data['info'] . "\n"; + } + + $failed_test_summary .= "=\n"; + } + if (count($PHP_FAILED_TESTS['LEAKED'])) { $failed_test_summary .= ' = -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiSat Apr 25 17:12:56 2009 UTC Modified files: /php-srcrun-tests.php Log: MFB52: sync http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.395&r2=1.396&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.395 php-src/run-tests.php:1.396 --- php-src/run-tests.php:1.395 Thu Apr 16 13:40:47 2009 +++ php-src/run-tests.php Sat Apr 25 17:12:56 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.395 2009/04/16 13:40:47 bjori Exp $ */ +/* $Id: run-tests.php,v 1.396 2009/04/25 17:12:56 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -71,14 +71,15 @@ define("PHP_MAJOR_VERSION", $major); } -// __DIR__ and FILE_BINARY is available from 5.3.0 +// __DIR__ is available from 5.3.0 if (PHP_VERSION_ID < 50300) { define('__DIR__', realpath(dirname(__FILE__))); - define('FILE_BINARY', 0); + // FILE_BINARY is available from 5.2.7 + if (PHP_VERSION_ID < 50207) { + define('FILE_BINARY', 0); + } } - - // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -632,7 +633,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.395 $' . "\n"; + echo '$Revision: 1.396 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
bjori Thu Apr 16 13:40:47 2009 UTC Modified files: /php-srcrun-tests.php Log: Make it possible to run on PHP5.2 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.394&r2=1.395&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.394 php-src/run-tests.php:1.395 --- php-src/run-tests.php:1.394 Thu Apr 16 13:39:31 2009 +++ php-src/run-tests.php Thu Apr 16 13:40:47 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.394 2009/04/16 13:39:31 bjori Exp $ */ +/* $Id: run-tests.php,v 1.395 2009/04/16 13:40:47 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,11 +59,26 @@ exit; } -// __DIR__ is available from 5.3.0 +// Version constants only available as of 5.2.8 +if (!defined("PHP_VERSION_ID")) { + list($major, $minor, $bug) = explode(".", phpversion(), 3); + $bug = (int)$bug; // Many distros make up their own versions + if ($bug < 10) { + $bug = "0$bug"; + } + + define("PHP_VERSION_ID", "{$major}0{$minor}$bug"); + define("PHP_MAJOR_VERSION", $major); +} + +// __DIR__ and FILE_BINARY is available from 5.3.0 if (PHP_VERSION_ID < 50300) { define('__DIR__', realpath(dirname(__FILE__))); + define('FILE_BINARY', 0); } + + // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -617,7 +632,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.394 $' . "\n"; + echo '$Revision: 1.395 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
bjori Thu Apr 16 13:39:31 2009 UTC Modified files: /php-srcrun-tests.php Log: Sync WS with 5.3 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.393&r2=1.394&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.393 php-src/run-tests.php:1.394 --- php-src/run-tests.php:1.393 Thu Mar 12 20:39:02 2009 +++ php-src/run-tests.php Thu Apr 16 13:39:31 2009 @@ -2,7 +2,7 @@ http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Thu Mar 12 20:39:03 2009 UTC Modified files: /php-srcrun-tests.php Log: refixing %r in run-tests.php (thanks iain lewis for the fix) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.392&r2=1.393&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.392 php-src/run-tests.php:1.393 --- php-src/run-tests.php:1.392 Tue Mar 10 23:39:10 2009 +++ php-src/run-tests.php Thu Mar 12 20:39:02 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.392 2009/03/10 23:39:10 helly Exp $ */ +/* $Id: run-tests.php,v 1.393 2009/03/12 20:39:02 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.392 $' . "\n"; + echo '$Revision: 1.393 $' . "\n"; exit(1); default: @@ -1738,32 +1738,33 @@ if (isset($section_text['EXPECTF'])) { -// do preg_quote, but miss out any %r delimited sections -$temp = ""; -$r = "%r"; -$startOffset = 0; -$length = strlen($wanted_re); -while($startOffset < $length) { - $start = strpos($wanted_re, $r, $startOffset); - if ($start !== false) { -// we have found a start tag -$end = strpos($wanted_re, $r, $start+2); -if ($end === false) { - // unbalanced tag, ignore it. - $end = $start = $length; -} - } else { -// no more %r sections -$start = $end = $length; - } - // quote a non re portion of the string - $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); - // add the re unquoted. - $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); - $startOffset = $end + 2; -} -$wanted_re = $temp; - $wanted_re = str_replace( + // do preg_quote, but miss out any %r delimited sections + $temp = ""; + $r = "%r"; + $startOffset = 0; + $length = strlen($wanted_re); + while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { + // we have found a start tag + $end = strpos($wanted_re, $r, $start+2); + if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; + } + } else { + // no more %r sections + $start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')'; + $startOffset = $end + 2; + } + $wanted_re = $temp; + + $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', $wanted_re -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Tue Mar 3 10:52:56 2009 UTC Modified files: /php-srcrun-tests.php Log: Added %r section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.390&r2=1.391&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.390 php-src/run-tests.php:1.391 --- php-src/run-tests.php:1.390 Mon Jan 5 11:14:37 2009 +++ php-src/run-tests.php Tue Mar 3 10:52:56 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.390 2009/01/05 11:14:37 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.391 2009/03/03 10:52:56 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.390 $' . "\n"; + echo '$Revision: 1.391 $' . "\n"; exit(1); default: @@ -1737,7 +1737,32 @@ $wanted_re = preg_replace('/\r\n/', "\n", $wanted); if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); + +// do preg_quote, but miss out any %r delimited sections +$temp = ""; +$r = "%r"; +$startOffset = 0; +$length = strlen($wanted_re); +while($startOffset < $length) { + $start = strpos($wanted_re, $r, $startOffset); + if ($start !== false) { +// we have found a start tag +$end = strpos($wanted_re, $r, $start+2); +if ($end === false) { + // unbalanced tag, ignore it. + $end = $start = $length; +} + } else { +// no more %r sections +$start = $end = $length; + } + // quote a non re portion of the string + $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); + // add the re unquoted. + $temp = $temp . substr($wanted_re, $start+2, ($end - $start-2)); + $startOffset = $end + 2; +} +$wanted_re = $temp; $wanted_re = str_replace( array('%binary_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On Wed, Jan 7, 2009 at 01:02, Jani Taskinen wrote: > Antony Dovgal kirjoitti: >> >> On 05.01.2009 15:37, Jani Taskinen wrote: >>> >>> That didn't answer the obvious question: does the run-tests.php from >>> PHP_5_3 work in PHP_5_2? :) >> >> Yes, it does. >> > > So why not sync it then and keep it same in all branches..? I think Tony is secretly hoping that Ilias patch will be reverted and someone fix the bug in another way. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Antony Dovgal kirjoitti: On 05.01.2009 15:37, Jani Taskinen wrote: That didn't answer the obvious question: does the run-tests.php from PHP_5_3 work in PHP_5_2? :) Yes, it does. So why not sync it then and keep it same in all branches..? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On 05.01.2009 15:37, Jani Taskinen wrote: > That didn't answer the obvious question: does the run-tests.php from > PHP_5_3 work in PHP_5_2? :) Yes, it does. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Antony Dovgal wrote: On 05.01.2009 14:51, Jani Taskinen wrote: patch was required because of his parser fixes. What parser fixes? http://news.php.net/php.zend-engine.cvs/7281 Hmm..what does that has to do with the fact that a PHP script should work fine regardless of PHP version? And considering the run-tests.php executes regression tests it's quite a regression if the script itself does not work. :D In case of a redirect run-tests.php adds "# original source is in <..>" line to the beginning of the test .php file. This line was ignored previously, but not after those Ilia's patches, so we have that line in the output and all the redirected tests fail, which is what I was trying to fix in rather clumsy way. That didn't answer the obvious question: does the run-tests.php from PHP_5_3 work in PHP_5_2? :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On 05.01.2009 14:51, Jani Taskinen wrote: patch was required because of his parser fixes. >>> What parser fixes? >> >> http://news.php.net/php.zend-engine.cvs/7281 > > Hmm..what does that has to do with the fact that a PHP script should > work fine regardless of PHP version? And considering the run-tests.php > executes regression tests it's quite a regression if the script itself > does not work. :D In case of a redirect run-tests.php adds "# original source is in <..>" line to the beginning of the test .php file. This line was ignored previously, but not after those Ilia's patches, so we have that line in the output and all the redirected tests fail, which is what I was trying to fix in rather clumsy way. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Antony Dovgal wrote: On 05.01.2009 14:02, Jani Taskinen wrote: Antony Dovgal wrote: On 05.01.2009 13:52, Jani Taskinen wrote: So now this is out-of-sync in all branches. Please, one version only.. 5_3 and HEAD are in sync, 5_2 is to be discussed with Ilia, since this Hmm..'diff -u php-5.3/run-tests.php php-6/run-tests.php' wants to disagree with you. :) Well, it *does* agree with me. And CVS log for run-tests.php confirms I'm not completely mad yet. Cheater, you committed the changes few minutes ago.. :D patch was required because of his parser fixes. What parser fixes? http://news.php.net/php.zend-engine.cvs/7281 Hmm..what does that has to do with the fact that a PHP script should work fine regardless of PHP version? And considering the run-tests.php executes regression tests it's quite a regression if the script itself does not work. :D --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On 05.01.2009 14:02, Jani Taskinen wrote: > Antony Dovgal wrote: >> On 05.01.2009 13:52, Jani Taskinen wrote: >>> So now this is out-of-sync in all branches. Please, one version only.. >> >> 5_3 and HEAD are in sync, 5_2 is to be discussed with Ilia, since this > > Hmm..'diff -u php-5.3/run-tests.php php-6/run-tests.php' wants to > disagree with you. :) Well, it *does* agree with me. And CVS log for run-tests.php confirms I'm not completely mad yet. >> patch was required because of his parser fixes. > > What parser fixes? http://news.php.net/php.zend-engine.cvs/7281 -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Mon Jan 5 11:14:37 2009 UTC Modified files: /php-srcrun-tests.php Log: fix ws http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.389&r2=1.390&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.389 php-src/run-tests.php:1.390 --- php-src/run-tests.php:1.389 Mon Jan 5 09:18:57 2009 +++ php-src/run-tests.php Mon Jan 5 11:14:37 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.389 2009/01/05 09:18:57 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.390 2009/01/05 11:14:37 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.389 $' . "\n"; + echo '$Revision: 1.390 $' . "\n"; exit(1); default: @@ -1786,15 +1786,15 @@ $php = $old_php; } -if (!$leaked && !$failed_headers) { -if (isset($section_text['XFAIL'] )) { -$warn = true; -$info = " (warn: XFAIL section but test passes)"; -}else { -show_result("PASS", $tested, $tested_file, '', $temp_filenames); -return 'PASSED'; -} -} + if (!$leaked && !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = " (warn: XFAIL section but test passes)"; + }else { + show_result("PASS", $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } + } } } else { @@ -1815,14 +1815,14 @@ $php = $old_php; } -if (!$leaked && !$failed_headers) { -if (isset($section_text['XFAIL'] )) { -$warn = true; -$info = " (warn: XFAIL section but test passes)"; -}else { -show_result("PASS", $tested, $tested_file, '', $temp_filenames); -return 'PASSED'; -} + if (!$leaked && !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = " (warn: XFAIL section but test passes)"; + }else { + show_result("PASS", $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Antony Dovgal wrote: On 05.01.2009 13:52, Jani Taskinen wrote: So now this is out-of-sync in all branches. Please, one version only.. 5_3 and HEAD are in sync, 5_2 is to be discussed with Ilia, since this Hmm..'diff -u php-5.3/run-tests.php php-6/run-tests.php' wants to disagree with you. :) patch was required because of his parser fixes. What parser fixes? --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On 05.01.2009 13:52, Jani Taskinen wrote: > So now this is out-of-sync in all branches. Please, one version only.. 5_3 and HEAD are in sync, 5_2 is to be discussed with Ilia, since this patch was required because of his parser fixes. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
So now this is out-of-sync in all branches. Please, one version only.. --Jani Antony Dovgal wrote: tony2001Mon Jan 5 09:18:57 2009 UTC Modified files: /php-src run-tests.php Log: only add "# original source" if a redirect is active http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.388&r2=1.389&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.388 php-src/run-tests.php:1.389 --- php-src/run-tests.php:1.388 Sun Jan 4 15:56:38 2009 +++ php-src/run-tests.php Mon Jan 5 09:18:57 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.388 2009/01/04 15:56:38 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.389 2009/01/05 09:18:57 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.388 $' . "\n"; + echo '$Revision: 1.389 $' . "\n"; exit(1); default: @@ -1870,7 +1870,9 @@ // write .diff $diff = generate_diff($wanted, $wanted_re, $output); - $diff = "# original source file: $shortname\n" . $diff; + if (is_array($IN_REDIRECT)) { + $diff = "# original source file: $shortname\n" . $diff; + } show_file_block('diff', $diff); if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) { error("Cannot create test diff - $diff_filename"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Mon Jan 5 09:18:57 2009 UTC Modified files: /php-srcrun-tests.php Log: only add "# original source" if a redirect is active http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.388&r2=1.389&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.388 php-src/run-tests.php:1.389 --- php-src/run-tests.php:1.388 Sun Jan 4 15:56:38 2009 +++ php-src/run-tests.php Mon Jan 5 09:18:57 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.388 2009/01/04 15:56:38 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.389 2009/01/05 09:18:57 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.388 $' . "\n"; + echo '$Revision: 1.389 $' . "\n"; exit(1); default: @@ -1870,7 +1870,9 @@ // write .diff $diff = generate_diff($wanted, $wanted_re, $output); - $diff = "# original source file: $shortname\n" . $diff; + if (is_array($IN_REDIRECT)) { + $diff = "# original source file: $shortname\n" . $diff; + } show_file_block('diff', $diff); if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) { error("Cannot create test diff - $diff_filename"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Don't forget PHP_5_2. It's so annoying when this thing gets out-of-sync when same script should run in any PHP version.. :) --Jani Antony Dovgal kirjoitti: tony2001Sun Jan 4 15:56:38 2009 UTC Modified files: /php-src run-tests.php Log: fix PDO and other 'redirected' tests - add that "# original source" line only if the test fails http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.387&r2=1.388&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.387 php-src/run-tests.php:1.388 --- php-src/run-tests.php:1.387 Wed Dec 31 17:32:54 2008 +++ php-src/run-tests.php Sun Jan 4 15:56:38 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.387 2008/12/31 17:32:54 zoe Exp $ */ +/* $Id: run-tests.php,v 1.388 2009/01/04 15:56:38 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.387 $' . "\n"; + echo '$Revision: 1.388 $' . "\n"; exit(1); default: @@ -1338,7 +1338,6 @@ if (is_array($IN_REDIRECT)) { $tested = $IN_REDIRECT['prefix'] . ' ' . trim($section_text['TEST']); $tested_file = $tmp_relative_file; - $section_text['FILE'] = "# original source file: $shortname\n" . $section_text['FILE']; } // unlink old test results @@ -1871,6 +1870,7 @@ // write .diff $diff = generate_diff($wanted, $wanted_re, $output); + $diff = "# original source file: $shortname\n" . $diff; show_file_block('diff', $diff); if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) { error("Cannot create test diff - $diff_filename"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Sun Jan 4 15:56:38 2009 UTC Modified files: /php-srcrun-tests.php Log: fix PDO and other 'redirected' tests - add that "# original source" line only if the test fails http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.387&r2=1.388&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.387 php-src/run-tests.php:1.388 --- php-src/run-tests.php:1.387 Wed Dec 31 17:32:54 2008 +++ php-src/run-tests.php Sun Jan 4 15:56:38 2009 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.387 2008/12/31 17:32:54 zoe Exp $ */ +/* $Id: run-tests.php,v 1.388 2009/01/04 15:56:38 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.387 $' . "\n"; + echo '$Revision: 1.388 $' . "\n"; exit(1); default: @@ -1338,7 +1338,6 @@ if (is_array($IN_REDIRECT)) { $tested = $IN_REDIRECT['prefix'] . ' ' . trim($section_text['TEST']); $tested_file = $tmp_relative_file; - $section_text['FILE'] = "# original source file: $shortname\n" . $section_text['FILE']; } // unlink old test results @@ -1871,6 +1870,7 @@ // write .diff $diff = generate_diff($wanted, $wanted_re, $output); + $diff = "# original source file: $shortname\n" . $diff; show_file_block('diff', $diff); if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) { error("Cannot create test diff - $diff_filename"); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Wed Dec 31 17:32:54 2008 UTC Modified files: /php-srcrun-tests.php Log: Fixed bug #46845 Test expected to fail, but pass, don't cause error http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.386&r2=1.387&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.386 php-src/run-tests.php:1.387 --- php-src/run-tests.php:1.386 Wed Dec 31 11:12:28 2008 +++ php-src/run-tests.php Wed Dec 31 17:32:54 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.386 2008/12/31 11:12:28 sebastian Exp $ */ +/* $Id: run-tests.php,v 1.387 2008/12/31 17:32:54 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.386 $' . "\n"; + echo '$Revision: 1.387 $' . "\n"; exit(1); default: @@ -1786,10 +1786,16 @@ if (isset($old_php)) { $php = $old_php; } - if (!$leaked && !$failed_headers) { - show_result("PASS", $tested, $tested_file, '', $temp_filenames); - return 'PASSED'; - } + +if (!$leaked && !$failed_headers) { +if (isset($section_text['XFAIL'] )) { +$warn = true; +$info = " (warn: XFAIL section but test passes)"; +}else { +show_result("PASS", $tested, $tested_file, '', $temp_filenames); +return 'PASSED'; +} +} } } else { @@ -1810,9 +1816,14 @@ $php = $old_php; } - if (!$leaked && !$failed_headers) { - show_result("PASS", $tested, $tested_file, '', $temp_filenames); - return 'PASSED'; +if (!$leaked && !$failed_headers) { +if (isset($section_text['XFAIL'] )) { +$warn = true; +$info = " (warn: XFAIL section but test passes)"; +}else { +show_result("PASS", $tested, $tested_file, '', $temp_filenames); +return 'PASSED'; +} } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
lstrojnyThu Dec 11 02:38:10 2008 UTC Modified files: /php-srcrun-tests.php Log: MFB: Fixing strict warning http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.384&r2=1.385&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.384 php-src/run-tests.php:1.385 --- php-src/run-tests.php:1.384 Tue Dec 9 15:20:58 2008 +++ php-src/run-tests.php Thu Dec 11 02:38:10 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.384 2008/12/09 15:20:58 jani Exp $ */ +/* $Id: run-tests.php,v 1.385 2008/12/11 02:38:10 lstrojny Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.384 $' . "\n"; + echo '$Revision: 1.385 $' . "\n"; exit(1); default: @@ -1009,7 +1009,7 @@ $data = ''; $bin_env = array(); - foreach($env as $key => $value) { + foreach((array)$env as $key => $value) { $bin_env[(binary)$key] = (binary)$value; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiTue Dec 9 15:20:58 2008 UTC Modified files: /php-srcrun-tests.php Log: - Use version id instead of defined() since latter does not work with magic constants http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.383&r2=1.384&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.383 php-src/run-tests.php:1.384 --- php-src/run-tests.php:1.383 Mon Dec 8 12:36:38 2008 +++ php-src/run-tests.php Tue Dec 9 15:20:58 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.383 2008/12/08 12:36:38 jani Exp $ */ +/* $Id: run-tests.php,v 1.384 2008/12/09 15:20:58 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,8 +59,8 @@ exit; } -// If __DIR__ is not defined, define it -if (!defined('__DIR__')) { +// __DIR__ is available from 5.3.0 +if (PHP_VERSION_ID < 50300) { define('__DIR__', realpath(dirname(__FILE__))); } @@ -617,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.383 $' . "\n"; + echo '$Revision: 1.384 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiMon Dec 8 12:36:38 2008 UTC Modified files: /php-srcrun-tests.php Log: - Sync with all branches (same run-tests.php everywhere http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.382&r2=1.383&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.382 php-src/run-tests.php:1.383 --- php-src/run-tests.php:1.382 Sat Dec 6 11:59:36 2008 +++ php-src/run-tests.php Mon Dec 8 12:36:38 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.382 2008/12/06 11:59:36 zoe Exp $ */ +/* $Id: run-tests.php,v 1.383 2008/12/08 12:36:38 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -59,6 +59,11 @@ exit; } +// If __DIR__ is not defined, define it +if (!defined('__DIR__')) { + define('__DIR__', realpath(dirname(__FILE__))); +} + // If timezone is not set, use UTC. if (ini_get('date.timezone') == '') { date_default_timezone_set('UTC'); @@ -612,7 +617,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.382 $' . "\n"; + echo '$Revision: 1.383 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Sat Dec 6 11:59:36 2008 UTC Modified files: /php-srcrun-tests.php Log: More changes to allow the same tests to be used with PHP5 and PHP6 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.381&r2=1.382&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.381 php-src/run-tests.php:1.382 --- php-src/run-tests.php:1.381 Thu Nov 6 03:08:58 2008 +++ php-src/run-tests.php Sat Dec 6 11:59:36 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.381 2008/11/06 03:08:58 scottmac Exp $ */ +/* $Id: run-tests.php,v 1.382 2008/12/06 11:59:36 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -612,7 +612,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.381 $' . "\n"; + echo '$Revision: 1.382 $' . "\n"; exit(1); default: @@ -1735,6 +1735,11 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); $wanted_re = str_replace( + array('%binary_string_optional%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', + $wanted_re + ); + $wanted_re = str_replace( array('%unicode_string_optional%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'Unicode string', $wanted_re -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
scottmacThu Nov 6 03:08:58 2008 UTC Modified files: /php-srcrun-tests.php Log: Support versions of valgrind from SVN. The version is shown as 3.4.0.SVN http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.380&r2=1.381&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.380 php-src/run-tests.php:1.381 --- php-src/run-tests.php:1.380 Sun Oct 19 18:04:35 2008 +++ php-src/run-tests.php Thu Nov 6 03:08:58 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.380 2008/10/19 18:04:35 johannes Exp $ */ +/* $Id: run-tests.php,v 1.381 2008/11/06 03:08:58 scottmac Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -543,7 +543,7 @@ if (!$valgrind_header) { error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); } else { - $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(-\w+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count); + $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)([.-]\w+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count); if ($replace_count != 1 || !is_numeric($valgrind_version)) { error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed."); } @@ -612,7 +612,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.380 $' . "\n"; + echo '$Revision: 1.381 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
johannesSun Oct 19 18:04:35 2008 UTC Modified files: /php-srcrun-tests.php Log: Add %S and %A to EXPECTF, they work like %s and %a but match empty strings, too http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.379&r2=1.380&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.379 php-src/run-tests.php:1.380 --- php-src/run-tests.php:1.379 Tue Sep 30 13:21:17 2008 +++ php-src/run-tests.php Sun Oct 19 18:04:35 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.379 2008/09/30 13:21:17 rrichards Exp $ */ +/* $Id: run-tests.php,v 1.380 2008/10/19 18:04:35 johannes Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -612,7 +612,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.379 $' . "\n"; + echo '$Revision: 1.380 $' . "\n"; exit(1); default: @@ -1752,7 +1752,9 @@ // Stick to basics $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); + $wanted_re = str_replace('%S', '[^\r\n]*', $wanted_re); $wanted_re = str_replace('%a', '.+', $wanted_re); + $wanted_re = str_replace('%A', '.*', $wanted_re); $wanted_re = str_replace('%w', '\s*', $wanted_re); $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
rrichards Tue Sep 30 13:21:17 2008 UTC Modified files: /php-srcrun-tests.php Log: Windows requires SystemRoot env var to run tests http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.378&r2=1.379&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.378 php-src/run-tests.php:1.379 --- php-src/run-tests.php:1.378 Fri Sep 12 14:14:52 2008 +++ php-src/run-tests.php Tue Sep 30 13:21:17 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.378 2008/09/12 14:14:52 lbarnaud Exp $ */ +/* $Id: run-tests.php,v 1.379 2008/09/30 13:21:17 rrichards Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -111,6 +111,9 @@ } $environment = isset($_ENV) ? $_ENV : array(); +if ((substr(PHP_OS, 0, 3) == "WIN") && empty($environment["SystemRoot"])) { + $environment["SystemRoot"] = getenv("SystemRoot"); +} // Don't ever guess at the PHP executable location. // Require the explicit specification. @@ -609,7 +612,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.378 $' . "\n"; + echo '$Revision: 1.379 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
lbarnaudFri Sep 12 14:14:53 2008 UTC Modified files: /php-srcrun-tests.php Log: Fix cwd when running tests out of tree with ZTS builds (fixes #45837) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.377&r2=1.378&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.377 php-src/run-tests.php:1.378 --- php-src/run-tests.php:1.377 Mon Sep 8 09:23:24 2008 +++ php-src/run-tests.php Fri Sep 12 14:14:52 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.377 2008/09/08 09:23:24 lbarnaud Exp $ */ +/* $Id: run-tests.php,v 1.378 2008/09/12 14:14:52 lbarnaud Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -609,7 +609,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.377 $' . "\n"; + echo '$Revision: 1.378 $' . "\n"; exit(1); default: @@ -996,7 +996,7 @@ function system_with_timeout($commandline, $env = null, $stdin = null) { - global $leak_check; + global $leak_check, $cwd; $data = ''; @@ -1009,7 +1009,7 @@ 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w') - ), $pipes, null, $bin_env, array('suppress_errors' => true, 'binary_pipes' => true)); + ), $pipes, $cwd, $bin_env, array('suppress_errors' => true, 'binary_pipes' => true)); if (!$proc) { return false; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
lbarnaudMon Sep 8 09:23:24 2008 UTC Modified files: /php-srcrun-tests.php Log: run-tests.php: Added %u|b% placeholder, like %unicode|string%, for array keys in var_dump() output. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.376&r2=1.377&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.376 php-src/run-tests.php:1.377 --- php-src/run-tests.php:1.376 Sat Aug 30 11:24:56 2008 +++ php-src/run-tests.php Mon Sep 8 09:23:24 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.376 2008/08/30 11:24:56 helly Exp $ */ +/* $Id: run-tests.php,v 1.377 2008/09/08 09:23:24 lbarnaud Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -609,7 +609,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.376 $' . "\n"; + echo '$Revision: 1.377 $' . "\n"; exit(1); default: @@ -1741,6 +1741,11 @@ version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode', $wanted_re ); + $wanted_re = str_replace( + array('%u\|b%', '%b\|u%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? '' : 'u', + $wanted_re + ); // Stick to basics $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Sat Aug 30 11:24:57 2008 UTC Modified files: /php-srcrun-tests.php Log: - Environment handling seems to have changed to respect unicode... so we have to convert everything to binary before passing it along. A bunch of tests suffer from this change in behavior as well. Can anyone explain to me what was changed and why? http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.375&r2=1.376&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.375 php-src/run-tests.php:1.376 --- php-src/run-tests.php:1.375 Fri Aug 29 10:25:35 2008 +++ php-src/run-tests.php Sat Aug 30 11:24:56 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.375 2008/08/29 10:25:35 felixdv Exp $ */ +/* $Id: run-tests.php,v 1.376 2008/08/30 11:24:56 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -559,6 +559,7 @@ case 'p': $php = $argv[++$i]; putenv("TEST_PHP_EXECUTABLE=$php"); + $environment['TEST_PHP_EXECUTABLE'] = $php; break; case 'q': putenv('NO_INTERACTION=1'); @@ -608,7 +609,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.375 $' . "\n"; + echo '$Revision: 1.376 $' . "\n"; exit(1); default: @@ -999,11 +1000,16 @@ $data = ''; + $bin_env = array(); + foreach($env as $key => $value) { + $bin_env[(binary)$key] = (binary)$value; + } + $proc = proc_open($commandline, array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w') - ), $pipes, null, $env, array('suppress_errors' => true, 'binary_pipes' => true)); + ), $pipes, null, $bin_env, array('suppress_errors' => true, 'binary_pipes' => true)); if (!$proc) { return false; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
felixdv Fri Aug 29 10:25:35 2008 UTC Modified files: /php-srcrun-tests.php Log: Added %unicode_string_optional% for differences in output between PHP 5 and 6 http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.374&r2=1.375&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.374 php-src/run-tests.php:1.375 --- php-src/run-tests.php:1.374 Thu Aug 14 23:29:59 2008 +++ php-src/run-tests.php Fri Aug 29 10:25:35 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.374 2008/08/14 23:29:59 jani Exp $ */ +/* $Id: run-tests.php,v 1.375 2008/08/29 10:25:35 felixdv Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -608,7 +608,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.374 $' . "\n"; + echo '$Revision: 1.375 $' . "\n"; exit(1); default: @@ -1726,6 +1726,11 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); $wanted_re = str_replace( + array('%unicode_string_optional%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'Unicode string', + $wanted_re + ); + $wanted_re = str_replace( array('%unicode\|string%', '%string\|unicode%'), version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode', $wanted_re -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiThu Aug 14 23:29:59 2008 UTC Modified files: /php-srcrun-tests.php Log: - No unnecessary errors please http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.373&r2=1.374&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.373 php-src/run-tests.php:1.374 --- php-src/run-tests.php:1.373 Tue Aug 5 16:25:31 2008 +++ php-src/run-tests.php Thu Aug 14 23:29:59 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.373 2008/08/05 16:25:31 jani Exp $ */ +/* $Id: run-tests.php,v 1.374 2008/08/14 23:29:59 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -389,7 +389,7 @@ } $failed_tests_data .= $sep . "PHPINFO" . $sep; - $failed_tests_data .= shell_exec($php . ' -dhtml_errors=0 -i'); + $failed_tests_data .= shell_exec($php . ' -ddisplay_errors=stderr -dhtml_errors=0 -i 2> /dev/null'); if ($just_save_results || !mail_qa_team($failed_tests_data, $compression, $status)) { file_put_contents($output_file, $failed_tests_data); @@ -608,7 +608,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.373 $' . "\n"; + echo '$Revision: 1.374 $' . "\n"; exit(1); default: @@ -1560,7 +1560,7 @@ } save_text($tmp_post, $request); - $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; } else if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { @@ -1581,7 +1581,7 @@ $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; $env['CONTENT_LENGTH'] = $content_length; - $cmd = "$php$pass_options$ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < $tmp_post"; } else { @@ -1589,7 +1589,7 @@ $env['CONTENT_TYPE'] = ''; $env['CONTENT_LENGTH'] = ''; - $cmd = "$php$pass_options$ini_settings -f \"$test_file\" $args 2>&1"; + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" $args 2>&1"; } if ($leak_check) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiTue Aug 5 16:25:31 2008 UTC Modified files: /php-srcrun-tests.php Log: - No need to load any php.ini here http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.372&r2=1.373&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.372 php-src/run-tests.php:1.373 --- php-src/run-tests.php:1.372 Sat Aug 2 13:39:26 2008 +++ php-src/run-tests.php Tue Aug 5 16:25:31 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.372 2008/08/02 13:39:26 felipe Exp $ */ +/* $Id: run-tests.php,v 1.373 2008/08/05 16:25:31 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -231,7 +231,7 @@ settings2array($ini_overwrites, $info_params); settings2params($info_params); $php_info = `$php $pass_options $info_params "$info_file"`; - define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`); + define('TESTED_PHP_VERSION', `$php -n -r "echo PHP_VERSION;"`); if ($php_cgi && $php != $php_cgi) { $php_info_cgi = `$php_cgi $pass_options $info_params -q "$info_file"`; @@ -608,7 +608,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.372 $' . "\n"; + echo '$Revision: 1.373 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
felipe Sat Aug 2 13:39:27 2008 UTC Modified files: /php-srcrun-tests.php Log: - Fixed undefined variable http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.371&r2=1.372&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.371 php-src/run-tests.php:1.372 --- php-src/run-tests.php:1.371 Fri Jul 25 09:55:51 2008 +++ php-src/run-tests.php Sat Aug 2 13:39:26 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.371 2008/07/25 09:55:51 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.372 2008/08/02 13:39:26 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -284,7 +284,7 @@ function save_or_mail_results() { global $sum_results, $just_save_results, $failed_test_summary, - $PHP_FAILED_TESTS, $CUR_DIR, $php, $output_file; + $PHP_FAILED_TESTS, $CUR_DIR, $php, $output_file, $compression; /* We got failed Tests, offer the user to send an e-mail to QA team, unless NO_INTERACTION is set */ if (!getenv('NO_INTERACTION')) { @@ -608,7 +608,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.371 $' . "\n"; + echo '$Revision: 1.372 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Fri Jul 25 09:55:51 2008 UTC Modified files: /php-srcrun-tests.php Log: fix typo http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.370&r2=1.371&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.370 php-src/run-tests.php:1.371 --- php-src/run-tests.php:1.370 Fri Jul 25 09:32:06 2008 +++ php-src/run-tests.php Fri Jul 25 09:55:51 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.370 2008/07/25 09:32:06 moriyoshi Exp $ */ +/* $Id: run-tests.php,v 1.371 2008/07/25 09:55:51 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -426,7 +426,7 @@ $output_file = 'compress.zlib://' . $output_file . '.gz'; } -$jnust_save_results = false; +$just_save_results = false; $leak_check = false; $html_output = false; $html_file = null; @@ -608,7 +608,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.370 $' . "\n"; + echo '$Revision: 1.371 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
moriyoshi Fri Jul 25 09:32:07 2008 UTC Modified files: /php-srcrun-tests.php Log: - Allow the results of a partial run to be saved when -s option is explicitly specified. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.369&r2=1.370&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.369 php-src/run-tests.php:1.370 --- php-src/run-tests.php:1.369 Thu Jul 24 21:39:23 2008 +++ php-src/run-tests.php Fri Jul 25 09:32:06 2008 @@ -24,12 +24,13 @@ +--+ */ -/* $Id: run-tests.php,v 1.369 2008/07/24 21:39:23 jani Exp $ */ +/* $Id: run-tests.php,v 1.370 2008/07/25 09:32:06 moriyoshi Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will * not run without it. */ + if (!extension_loaded('pcre')) { echo <
Re: [PHP-CVS] cvs: php-src / run-tests.php
Em Qui, 2008-07-24 às 21:39 +, Jani Taskinen escreveu: > jani Thu Jul 24 21:39:23 2008 UTC > > Modified files: > /php-src run-tests.php > Log: > - Revert accidental commit. Opsss, Thanks Jani! :D > -- Regards, Felipe Pena. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiThu Jul 24 21:39:23 2008 UTC Modified files: /php-srcrun-tests.php Log: - Revert accidental commit. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.368&r2=1.369&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.368 php-src/run-tests.php:1.369 --- php-src/run-tests.php:1.368 Thu Jul 24 19:50:22 2008 +++ php-src/run-tests.php Thu Jul 24 21:39:23 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.368 2008/07/24 19:50:22 felipe Exp $ */ +/* $Id: run-tests.php,v 1.369 2008/07/24 21:39:23 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -189,11 +189,7 @@ 'safe_mode=0', 'disable_functions=', 'output_buffering=Off', -<<< run-tests.php - 'error_reporting=32767', /* E_ALL | E_STRICT */ -=== 'error_reporting=' . (E_ALL | E_STRICT), ->>> 1.367 'display_errors=1', 'display_startup_errors=1', 'log_errors=0', @@ -482,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.368 $' . "\n"; + echo '$Revision: 1.369 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php /ext/mysqlnd mysqlnd_debug.c /ext/reflection php_reflection.c /ext/standard basic_functions.c browscap.c var.c ZendEngine2 zend_API.c zend_builtin_functions.
felipe Thu Jul 24 19:50:23 2008 UTC Modified files: /php-srcrun-tests.php /ZendEngine2zend_API.c zend_builtin_functions.c zend_closures.c zend_compile.c zend_exceptions.c zend_hash.c zend_hash.h zend_ts_hash.c zend_ts_hash.h /php-src/ext/mysqlndmysqlnd_debug.c /php-src/ext/reflection php_reflection.c /php-src/ext/standard basic_functions.c browscap.c var.c Log: - Added TSRMLS_DC to apply_func_args_t and zend_hash_apply_with_arguments. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.367&r2=1.368&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.367 php-src/run-tests.php:1.368 --- php-src/run-tests.php:1.367 Wed Jul 23 16:10:14 2008 +++ php-src/run-tests.php Thu Jul 24 19:50:22 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.367 2008/07/23 16:10:14 lstrojny Exp $ */ +/* $Id: run-tests.php,v 1.368 2008/07/24 19:50:22 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -189,7 +189,11 @@ 'safe_mode=0', 'disable_functions=', 'output_buffering=Off', +<<< run-tests.php + 'error_reporting=32767', /* E_ALL | E_STRICT */ +=== 'error_reporting=' . (E_ALL | E_STRICT), +>>> 1.367 'display_errors=1', 'display_startup_errors=1', 'log_errors=0', @@ -478,7 +482,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.367 $' . "\n"; + echo '$Revision: 1.368 $' . "\n"; exit(1); default: http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.476&r2=1.477&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.476 ZendEngine2/zend_API.c:1.477 --- ZendEngine2/zend_API.c:1.476Thu Jul 24 10:13:59 2008 +++ ZendEngine2/zend_API.c Thu Jul 24 19:50:22 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: zend_API.c,v 1.476 2008/07/24 10:13:59 dmitry Exp $ */ +/* $Id: zend_API.c,v 1.477 2008/07/24 19:50:22 felipe Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1208,7 +1208,7 @@ } /* }}} */ -static int zend_merge_property(zval **value, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ +static int zend_merge_property(zval **value TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { /* which name should a numeric property have ? */ if (hash_key->nKeyLength) { @@ -1239,7 +1239,7 @@ zend_class_entry *old_scope = EG(scope); EG(scope) = Z_OBJCE_P(obj); - zend_hash_apply_with_arguments(properties, (apply_func_args_t)zend_merge_property, 2, obj, obj_ht); + zend_hash_apply_with_arguments(properties TSRMLS_CC, (apply_func_args_t)zend_merge_property, 2, obj, obj_ht); EG(scope) = old_scope; if (destroy_ht) { http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.378&r2=1.379&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.378 ZendEngine2/zend_builtin_functions.c:1.379 --- ZendEngine2/zend_builtin_functions.c:1.378 Mon Jul 21 09:36:21 2008 +++ ZendEngine2/zend_builtin_functions.cThu Jul 24 19:50:22 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: zend_builtin_functions.c,v 1.378 2008/07/21 09:36:21 bjori Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.379 2008/07/24 19:50:22 felipe Exp $ */ #include "zend.h" #include "zend_API.h" @@ -1625,14 +1625,13 @@ } /* }}} */ -static int copy_class_or_interface_name(zend_class_entry **pce, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ +static int copy_class_or_interface_name(zend_class_entry **pce TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { zval *array = va_arg(args, zval *); zend_uint mask = va_arg(args, zend_uint); zend_uint comply = va_arg(args, zend_uint); zend_uint comply_mask = (comply)? mask:0; zend_class_entry *ce = *pce; - TSRMLS_FETCH(); if ((hash_key->nKeyLength==0 || (hash_key->type == IS_UNICODE && hash_key->arKey.u[0] != 0) || @@ -1656,7 +1655,7 @@ } array_init(return_value); - zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t) copy_class_o
[PHP-CVS] cvs: php-src / run-tests.php
lstrojnyWed Jul 23 16:10:14 2008 UTC Modified files: /php-srcrun-tests.php Log: Allowing "%unicode|string%" as a placeholder. In 6, this placeholder is resolved to "unicode", in <6 to "string". This allows to easily write portable tests. Patch by uw http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.366&r2=1.367&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.366 php-src/run-tests.php:1.367 --- php-src/run-tests.php:1.366 Tue Jul 22 19:53:00 2008 +++ php-src/run-tests.php Wed Jul 23 16:10:14 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.366 2008/07/22 19:53:00 felipe Exp $ */ +/* $Id: run-tests.php,v 1.367 2008/07/23 16:10:14 lstrojny Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -478,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.366 $' . "\n"; + echo '$Revision: 1.367 $' . "\n"; exit(1); default: @@ -1711,6 +1711,11 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); + $wanted_re = str_replace( + array('%unicode\|string%', '%string\|unicode%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode', + $wanted_re + ); // Stick to basics $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
felipe Tue Jul 22 19:53:00 2008 UTC Modified files: /php-srcrun-tests.php Log: - The error level must be E_ALL | E_STRICT. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.365&r2=1.366&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.365 php-src/run-tests.php:1.366 --- php-src/run-tests.php:1.365 Tue Jul 22 09:34:40 2008 +++ php-src/run-tests.php Tue Jul 22 19:53:00 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.365 2008/07/22 09:34:40 sfox Exp $ */ +/* $Id: run-tests.php,v 1.366 2008/07/22 19:53:00 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -189,7 +189,7 @@ 'safe_mode=0', 'disable_functions=', 'output_buffering=Off', - 'error_reporting=' . ((PHP_MAJOR_VERSION == 5) ? '32767' : '30719'), + 'error_reporting=' . (E_ALL | E_STRICT), 'display_errors=1', 'display_startup_errors=1', 'log_errors=0', @@ -478,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.365 $' . "\n"; + echo '$Revision: 1.366 $' . "\n"; exit(1); default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
sfoxTue Jul 22 09:34:40 2008 UTC Modified files: /php-srcrun-tests.php Log: - Add missing help text http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.364&r2=1.365&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.364 php-src/run-tests.php:1.365 --- php-src/run-tests.php:1.364 Mon Jul 21 16:07:57 2008 +++ php-src/run-tests.php Tue Jul 22 09:34:40 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.364 2008/07/21 16:07:57 jani Exp $ */ +/* $Id: run-tests.php,v 1.365 2008/07/22 09:34:40 sfox Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -478,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.364 $' . "\n"; + echo '$Revision: 1.365 $' . "\n"; exit(1); default: @@ -517,7 +517,7 @@ -sWrite output to . --x FIXME: STEPH WRITES THE HELP TEXT HERE!! +-x Sets 'SKIP_SLOW_TESTS' environmental variable. --verbose -v Verbose mode. @@ -539,8 +539,10 @@ Do not delete 'all' files, 'php' test file, 'skip' or 'clean' file. ---set-timeout -FIXME: STEPH WRITES THE HELP TEXT HERE!! +--set-timeout [n] +Set timeout for individual tests, where [n] is the number of +seconds. The default value is 60 seconds, or 300 seconds when +testing for memory leaks. --show-[all|php|skip|clean|exp|diff|out] Show 'all' files, 'php' test file, 'skip' or 'clean' file. You -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiMon Jul 21 16:07:57 2008 UTC Modified files: /php-srcrun-tests.php Log: Sync with PHP 5.3 (might not work 100% yet due to huge inconsistencies AND bugs in PHP http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.363&r2=1.364&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.363 php-src/run-tests.php:1.364 --- php-src/run-tests.php:1.363 Mon Jul 21 10:55:13 2008 +++ php-src/run-tests.php Mon Jul 21 16:07:57 2008 @@ -2,7 +2,7 @@ Specify PHP executable to run. - + -q Quiet, no user interaction (same as environment NO_INTERACTION). -sWrite output to . +-x FIXME: STEPH WRITES THE HELP TEXT HERE!! + --verbose -v Verbose mode. @@ -506,6 +539,9 @@ Do not delete 'all' files, 'php' test file, 'skip' or 'clean' file. +--set-timeout +FIXME: STEPH WRITES THE HELP TEXT HERE!! + --show-[all|php|skip|clean|exp|diff|out] Show 'all' files, 'php' test file, 'skip' or 'clean' file. You can also use this to show the output 'out', the expected result @@ -548,7 +584,7 @@ } if (strlen($conf_passed)) { - if (substr(PHP_OS, 0, 3) != "WIN") { + if (substr(PHP_OS, 0, 3) == "WIN") { $pass_options .= " -c " . escapeshellarg($conf_passed); } else { $pass_options .= " -c '$conf_passed'"; @@ -685,7 +721,7 @@ function test_sort($a, $b) { global $cwd; - + $a = test_name($a); $b = test_name($b); @@ -736,7 +772,7 @@ /* We got failed Tests, offer the user to send an e-mail to QA team, unless NO_INTERACTION is set */ if (!getenv('NO_INTERACTION')) { $fp = fopen("php://stdin", "r+"); - if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED']|| $sum_results['XFAILED']) { + if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED'] || $sum_results['XFAILED']) { echo "\nYou may have found a problem in PHP."; } echo "\nWe would like to send this report automatically to the\n"; @@ -775,14 +811,12 @@ $failed_tests_data .= get_summary(true, false) . "\n"; if ($sum_results['FAILED']) { - foreach ($PHP_FAILED_TESTS['FAILED'] as $test_info) { $failed_tests_data .= $sep . $test_info['name'] . $test_info['info']; $failed_tests_data .= $sep . file_get_contents(realpath($test_info['output'])); $failed_tests_data .= $sep . file_get_contents(realpath($test_info['diff'])); $failed_tests_data .= $sep . "\n\n"; } - $status = "failed"; } else { $status = "success"; @@ -829,7 +863,7 @@ $failed_tests_data .= "Bundled Libtool:\n$libtool\n"; $failed_tests_data .= "System Libtool:\n$sys_libtool\n"; $failed_tests_data .= "Compiler:\n$compiler\n"; - $failed_tests_data .= "Bison:\n". @shell_exec('bison --version 2>/dev/null'). "\n"; + $failed_tests_data .= "Bison:\n". shell_exec('bison --version 2>/dev/null') . "\n"; $failed_tests_data .= "Libraries:\n$ldd\n"; $failed_tests_data .= "\n"; @@ -874,7 +908,7 @@ $data = "php_test_data=" . urlencode(base64_encode(str_replace("\00", '[0x0]', $data))); $data_length = strlen($data); - + $fs = fsockopen($url_bits['host'], $url_bits['port'], $errno, $errstr, 10); if (!$fs) { @@ -906,12 +940,12 @@ global $DETAILED; if ($filename_copy && $filename_copy != $filename) { - if (@file_put_contents($filename_copy, $text, FILE_BINARY) === false) { + if (file_put_contents($filename_copy, (binary) $text, FILE_BINARY) === false) { error("Cannot open file '" . $filename_copy . "' (save_text)"); } } - if (@file_put_contents($filename, $text, FILE_BINARY) === false) { + if (file_put_contents($filename, (binary) $text, FILE_BINARY) === false) { error("Cannot open file '" . $filename . "' (save_text)"); } @@ -947,29 +981,32 @@ { global $leak_check; - $data = ""; + $data = ''; + $proc = proc_open($commandline, array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w') - ), $pipes, null, $env, array("suppress_errors" => true, "binary_pipes" => true)); + ), $pipes, null, $env, array('suppress_errors' => true, 'binary_pipes' => t
[PHP-CVS] cvs: php-src / run-tests.php
janiMon Jul 21 10:55:13 2008 UTC Modified files: /php-srcrun-tests.php Log: - This is still available in HEAD, so keep the override here! http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.362&r2=1.363&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.362 php-src/run-tests.php:1.363 --- php-src/run-tests.php:1.362 Mon Jul 21 09:36:21 2008 +++ php-src/run-tests.php Mon Jul 21 10:55:13 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.362 2008/07/21 09:36:21 bjori Exp $ */ +/* $Id: run-tests.php,v 1.363 2008/07/21 10:55:13 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -227,6 +227,7 @@ 'tidy' => array('tidy.clean_output=0'), 'zlib' => array('zlib.output_compression=Off'), 'xdebug' => array('xdebug.default_enable=0'), + 'mbstring' => array('mbstring.func_overload=0'), ); foreach($info_params_ex as $ext => $ini_overwrites_ex) { @@ -447,7 +448,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.362 $' . "\n"; + echo '$Revision: 1.363 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
nlopess Tue Jul 8 18:18:49 2008 UTC Modified files: /php-srcrun-tests.php Log: MFB: increase pcre.backtrack_limit http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.360&r2=1.361&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.360 php-src/run-tests.php:1.361 --- php-src/run-tests.php:1.360 Thu Jul 3 10:24:44 2008 +++ php-src/run-tests.php Tue Jul 8 18:18:49 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.360 2008/07/03 10:24:44 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.361 2008/07/08 18:18:49 nlopess Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -76,6 +76,8 @@ $cwd = getcwd(); set_time_limit(0); +ini_set('pcre.backtrack_limit', PHP_INT_MAX); + $valgrind_version = 0; $valgrind_header = ''; @@ -445,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.360 $' . "\n"; + echo '$Revision: 1.361 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Thu Jul 3 10:24:44 2008 UTC Modified files: /php-srcrun-tests.php Log: fix run-tests.php failure when no custom php.ini passed http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.359&r2=1.360&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.359 php-src/run-tests.php:1.360 --- php-src/run-tests.php:1.359 Wed Jul 2 15:01:08 2008 +++ php-src/run-tests.php Thu Jul 3 10:24:44 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.359 2008/07/02 15:01:08 ohill Exp $ */ +/* $Id: run-tests.php,v 1.360 2008/07/03 10:24:44 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.359 $' . "\n"; + echo '$Revision: 1.360 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -544,10 +544,12 @@ } } - if (substr(PHP_OS, 0, 3) != "WIN") { - $pass_options .= " -c " . escapeshellarg($conf_passed); - } else { - $pass_options .= " -c '$conf_passed'"; + if (strlen($conf_passed)) { + if (substr(PHP_OS, 0, 3) != "WIN") { + $pass_options .= " -c " . escapeshellarg($conf_passed); + } else { + $pass_options .= " -c '$conf_passed'"; + } } $test_files = array_unique($test_files); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
ohill Wed Jul 2 15:01:09 2008 UTC Modified files: /php-srcrun-tests.php Log: MFB: Fix parse error http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.358&r2=1.359&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.358 php-src/run-tests.php:1.359 --- php-src/run-tests.php:1.358 Wed Jul 2 12:46:48 2008 +++ php-src/run-tests.php Wed Jul 2 15:01:08 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.358 2008/07/02 12:46:48 pajoye Exp $ */ +/* $Id: run-tests.php,v 1.359 2008/07/02 15:01:08 ohill Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.358 $' . "\n"; + echo '$Revision: 1.359 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -544,7 +544,7 @@ } } - if (substr(PHP_OS, 0, 3) != "WIN")) { + if (substr(PHP_OS, 0, 3) != "WIN") { $pass_options .= " -c " . escapeshellarg($conf_passed); } else { $pass_options .= " -c '$conf_passed'"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
pajoye Wed Jul 2 12:46:48 2008 UTC Modified files: /php-srcrun-tests.php Log: - fix make test TESTS=... and dynamic extension usage on windows http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.357&r2=1.358&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.357 php-src/run-tests.php:1.358 --- php-src/run-tests.php:1.357 Thu Jun 12 21:59:25 2008 +++ php-src/run-tests.php Wed Jul 2 12:46:48 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.357 2008/06/12 21:59:25 hnangelo Exp $ */ +/* $Id: run-tests.php,v 1.358 2008/07/02 12:46:48 pajoye Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.357 $' . "\n"; + echo '$Revision: 1.358 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -544,7 +544,9 @@ } } - if (strlen($conf_passed)) { + if (substr(PHP_OS, 0, 3) != "WIN")) { + $pass_options .= " -c " . escapeshellarg($conf_passed); + } else { $pass_options .= " -c '$conf_passed'"; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Hello Steph, Thursday, June 12, 2008, 11:38:50 AM, you wrote: > sfoxThu Jun 12 09:38:50 2008 UTC > Modified files: > /php-srcrun-tests.php > Log: > - Some calls to file_put_contents() need FILE_BINARY, others choke on it. > You tell me. > > http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.353&r2=1.354&diff_format=u > Index: php-src/run-tests.php > diff -u php-src/run-tests.php:1.353 php-src/run-tests.php:1.354 > --- php-src/run-tests.php:1.353 Wed Jun 11 17:41:13 2008 > +++ php-src/run-tests.php Thu Jun 12 09:38:50 2008 > @@ -1,5 +1,6 @@ > #!/usr/bin/php > +putenv('TEST_PHP_EXECUTABLE=C:/sandbox/php6/Debug_TS/php.exe'); but either way, we all don't need this here :-) Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
hnangeloThu Jun 12 21:59:25 2008 UTC Modified files: /php-srcrun-tests.php Log: Fix the script to correctly determine the extensions to be tested http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.356&r2=1.357&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.356 php-src/run-tests.php:1.357 --- php-src/run-tests.php:1.356 Thu Jun 12 12:02:01 2008 +++ php-src/run-tests.php Thu Jun 12 21:59:25 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.356 2008/06/12 12:02:01 sfox Exp $ */ +/* $Id: run-tests.php,v 1.357 2008/06/12 21:59:25 hnangelo Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -218,7 +218,7 @@ // load list of enabled extensions save_text($info_file, ''); - $exts_to_test = explode(', ',`$php $pass_options $info_params "$info_file"`); + $exts_to_test = explode(',',`$php $pass_options $info_params "$info_file"`); // check for extensions that need special handling and regenerate $info_params_ex = array( 'session' => array('session.auto_start=0'), @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.356 $' . "\n"; + echo '$Revision: 1.357 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
sfoxThu Jun 12 12:02:02 2008 UTC Modified files: /php-srcrun-tests.php Log: - Tidy up loose ends in diff and exp output - All test output now has *nix line endings (only diffs didn't in 5_3) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.355&r2=1.356&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.355 php-src/run-tests.php:1.356 --- php-src/run-tests.php:1.355 Thu Jun 12 10:38:49 2008 +++ php-src/run-tests.php Thu Jun 12 12:02:01 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.355 2008/06/12 10:38:49 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.356 2008/06/12 12:02:01 sfox Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.355 $' . "\n"; + echo '$Revision: 1.356 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -1783,7 +1783,7 @@ if (!$passed) { // write .exp - if (strpos($log_format, 'E') !== false && file_put_contents($exp_filename, $wanted) === false) { + if (strpos($log_format, 'E') !== false && file_put_contents($exp_filename, (binary)$wanted, FILE_BINARY) === false) { error("Cannot create expected test output - $exp_filename"); } @@ -1796,7 +1796,7 @@ $diff = generate_diff($wanted, $wanted_re, $output); show_file_block('diff', $diff); - if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, $diff) === false) { + if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary)$diff, FILE_BINARY) === false) { error("Cannot create test diff - $diff_filename"); } @@ -2008,10 +2008,10 @@ $diff = generate_array_diff($r, $o, !is_null($wanted_re), $w); if (is_binary($output)) { - return implode(b"\r\n", $diff); + return implode(b"\n", $diff); } - return implode("\r\n", $diff); + return implode("\n", $diff); } function error($message) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Thanks, I'd just spotted it :) - Original Message - From: "Antony Dovgal" <[EMAIL PROTECTED]> To: Sent: Thursday, June 12, 2008 11:38 AM Subject: [PHP-CVS] cvs: php-src / run-tests.php tony2001 Thu Jun 12 10:38:49 2008 UTC Modified files: /php-src run-tests.php Log: remove oops http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.354&r2=1.355&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.354 php-src/run-tests.php:1.355 --- php-src/run-tests.php:1.354 Thu Jun 12 09:38:50 2008 +++ php-src/run-tests.php Thu Jun 12 10:38:49 2008 @@ -1,6 +1,5 @@ #!/usr/bin/php | PHP Version 6 | @@ -25,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.354 2008/06/12 09:38:50 sfox Exp $ */ +/* $Id: run-tests.php,v 1.355 2008/06/12 10:38:49 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -446,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.354 $' . "\n"; + echo '$Revision: 1.355 $' . "\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Thu Jun 12 10:38:49 2008 UTC Modified files: /php-srcrun-tests.php Log: remove oops http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.354&r2=1.355&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.354 php-src/run-tests.php:1.355 --- php-src/run-tests.php:1.354 Thu Jun 12 09:38:50 2008 +++ php-src/run-tests.php Thu Jun 12 10:38:49 2008 @@ -1,6 +1,5 @@ #!/usr/bin/php http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
sfoxThu Jun 12 09:38:50 2008 UTC Modified files: /php-srcrun-tests.php Log: - Some calls to file_put_contents() need FILE_BINARY, others choke on it. You tell me. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.353&r2=1.354&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.353 php-src/run-tests.php:1.354 --- php-src/run-tests.php:1.353 Wed Jun 11 17:41:13 2008 +++ php-src/run-tests.php Thu Jun 12 09:38:50 2008 @@ -1,5 +1,6 @@ #!/usr/bin/php http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
sfoxWed Jun 11 17:41:13 2008 UTC Modified files: /php-srcrun-tests.php Log: - more cs/ws fixes http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.352&r2=1.353&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.352 php-src/run-tests.php:1.353 --- php-src/run-tests.php:1.352 Wed Jun 11 16:48:41 2008 +++ php-src/run-tests.php Wed Jun 11 17:41:13 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.352 2008/06/11 16:48:41 sfox Exp $ */ +/* $Id: run-tests.php,v 1.353 2008/06/11 17:41:13 sfox Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -98,11 +98,11 @@ $php = getenv('TEST_PHP_EXECUTABLE'); if ($php=='auto') { - $php = $cwd.'/sapi/cli/php'; + $php = $cwd . '/sapi/cli/php'; putenv("TEST_PHP_EXECUTABLE=$php"); if (!getenv('TEST_PHP_CGI_EXECUTABLE')) { - $php_cgi = $cwd.'/sapi/cgi/php-cgi'; + $php_cgi = $cwd . '/sapi/cgi/php-cgi'; if (file_exists($php_cgi)) { putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi"); @@ -118,7 +118,7 @@ $php_cgi = getenv('TEST_PHP_CGI_EXECUTABLE'); if ($php_cgi=='auto') { - $php_cgi = $cwd.'/sapi/cgi/php-cgi'; + $php_cgi = $cwd . '/sapi/cgi/php-cgi'; putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi"); } @@ -320,7 +320,7 @@ foreach($cfgtypes as $type) { if (strpos($switch, '--' . $type) === 0) { foreach($cfgfiles as $file) { - if ($switch == '--' . $type.'-' . $file) { + if ($switch == '--' . $type . '-' . $file) { $cfg[$type][$file] = true; $is_switch = false; break; @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.352 $'."\n"; + echo '$Revision: 1.353 $' . "\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -806,12 +806,12 @@ /* Try the most common flags for 'version' */ $flags = array('-v', '-V', '--version'); - $cc_status=0; + $cc_status = 0; foreach($flags AS $flag) { - system(getenv('CC')." $flag >/dev/null 2>&1", $cc_status); + system(getenv('CC') . " $flag >/dev/null 2>&1", $cc_status); if ($cc_status == 0) { - $compiler = shell_exec(getenv('CC')." $flag 2>&1"); + $compiler = shell_exec(getenv('CC') . " $flag 2>&1"); break; } } @@ -828,11 +828,11 @@ $failed_tests_data .= "\n"; if (isset($user_email)) { - $failed_tests_data .= "User's E-mail: " . $user_email."\n\n"; + $failed_tests_data .= "User's E-mail: " . $user_email . "\n\n"; } $failed_tests_data .= $sep . "PHPINFO" . $sep; - $failed_tests_data .= shell_exec($php.' -dhtml_errors=0 -i'); + $failed_tests_data .= shell_exec($php . ' -dhtml_errors=0 -i'); if ($just_save_results || !mail_qa_team($failed_tests_data, $compression, $status)) { file_put_contents($output_file, $failed_tests_data); @@ -1178,7 +1178,7 @@ } fclose($fp); - $shortname = str_replace($cwd.'/', '', $file); + $shortname = str_replace($cwd . '/', '', $file); $tested_file = $shortname; if ($borked) { @@ -1200,17 +1200,17 @@ if (isset($php_cgi)) { $old_php = $php; - $php = $php_cgi .' -C '; + $php = $php_cgi . ' -C '; - } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { + } else if (!strncasecm
[PHP-CVS] cvs: php-src / run-tests.php
sfoxWed Jun 11 16:48:41 2008 UTC Modified files: /php-srcrun-tests.php Log: - binary safety http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.351&r2=1.352&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.351 php-src/run-tests.php:1.352 --- php-src/run-tests.php:1.351 Wed Jun 11 15:42:06 2008 +++ php-src/run-tests.php Wed Jun 11 16:48:41 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.351 2008/06/11 15:42:06 sfox Exp $ */ +/* $Id: run-tests.php,v 1.352 2008/06/11 16:48:41 sfox Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -445,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.351 $'."\n"; + echo '$Revision: 1.352 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -980,6 +980,10 @@ break; } + if (is_binary($line)) { + $data = (binary)$data; + } + $data .= $line; } } @@ -1601,7 +1605,11 @@ } // Does the output match what is expected? - $output = str_replace("\r\n", "\n", trim($out)); + if (is_binary($out)) { + $output = preg_replace(b'/\r\n/', b"\n", trim($out)); + } else { + $output = str_replace("\r\n", "\n", trim($out)); + } /* when using CGI, strip the headers from the output */ $headers = ""; @@ -1688,8 +1696,14 @@ print(str_repeat('=', 80) . "\n"); var_dump($output); */ - if (preg_match("/^$wanted_re\$/s", $output)) { - $passed = true; + if (is_binary($output)) { + if (preg_match((binary)"/^$wanted_re\$/s", $output)) { + $passed = true; + } + } else { + if (preg_match("/^$wanted_re\$/s", $output)) { + $passed = true; + } } if ($passed) { @@ -1711,13 +1725,12 @@ $wanted = trim($section_text['EXPECT']); - if (is_unicode($wanted)) { - /* workaround until preg_replace() or str_replace() are upgraded */ - $wanted = unicode_encode($wanted, ini_get('unicode.output_encoding') ?: 'utf-8'); + if (is_binary($wanted)) { + $wanted = preg_replace(b'/\r\n/', b"\n", (binary)$wanted); + } else { + $wanted = preg_replace('/\r\n/', "\n", $wanted); } - $wanted = preg_replace('/\r\n/', "\n", $wanted); - show_file_block('exp', $wanted); // compare and leave on success @@ -1789,13 +1802,25 @@ } // write .log - if (strpos($log_format,'L') !== false && file_put_contents($log_filename, " + if (is_binary($output)) { + $content = b" EXPECTED OUTPUT $wanted ACTUAL OUTPUT $output FAILED -") === false) { +"; + } else { + $content = " + EXPECTED OUTPUT +$wanted + ACTUAL OUTPUT +$output + FAILED +"; + } + + if (strpos($log_format, 'L') !== false && file_put_contents($log_filename, $content) === false) { error("Cannot create test log - $log_filename"); error_report($file, $log_filename, $tested); } @@ -1823,8 +1848,19 @@ function comp_line($l1, $l2, $is_reg) { if ($is_reg) { + + if (is_binary($l2)) { + return preg_match((binary)"/^$l1\$/s", (binary)$l2); + } + return preg_match("/^$l1$/s", $l2); + } else { + + if (is_binary($l2)) { + return !strcmp((binary)$l1, (binary)$l2); + } + return !strcmp($l1, $l2); } } @@ -1891,14 +1927,34 @@ $c2 = count_array_diff($ar1, $ar2, $is_reg, $w, $idx1, $idx2+1, $cnt1, $cnt2, 10); if ($c1 > $c2) { - $old1[$idx1] = sprintf("%03d- ", $idx1+1) . $w[$idx1++]; + + if (is_binary($w[$idx1]
[PHP-CVS] cvs: php-src / run-tests.php
sfoxWed Jun 11 15:42:06 2008 UTC Modified files: /php-srcrun-tests.php Log: - kill unicode.semantics checks http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.350&r2=1.351&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.350 php-src/run-tests.php:1.351 --- php-src/run-tests.php:1.350 Wed Jun 11 14:35:08 2008 +++ php-src/run-tests.php Wed Jun 11 15:42:06 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.350 2008/06/11 14:35:08 sfox Exp $ */ +/* $Id: run-tests.php,v 1.351 2008/06/11 15:42:06 sfox Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -84,11 +84,6 @@ if (ob_get_level()) echo "Not all buffers were deleted.\n"; error_reporting(E_ALL); -ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections - -if (ini_get("unicode.semantics")) { - error("It is currently not possible to use run-tests.php with unicode.semantics=On. Please turn it Off and re-run the tests."); -} $environment = isset($_ENV) ? $_ENV : array(); @@ -183,8 +178,11 @@ 'error_append_string=', 'auto_prepend_file=', 'auto_append_file=', - 'magic_quotes_runtime=0', 'ignore_repeated_errors=0', + 'unicode.runtime_encoding=ISO-8859-1', + 'unicode.script_encoding=UTF-8', + 'unicode.output_encoding=UTF-8', + 'unicode.from_error_mode=U_INVALID_SUBSTITUTE', ); function write_information($show_html) @@ -218,9 +216,6 @@ @unlink($info_file); - $unicode = 1; - define('TESTED_UNICODE', 1); - // load list of enabled extensions save_text($info_file, ''); $exts_to_test = explode(', ',`$php $pass_options $info_params "$info_file"`); @@ -276,8 +271,6 @@ $just_save_results = false; $leak_check = false; -$unicode_and_native = false; -$unicode_testing = false; $html_output = false; $html_file = null; $temp_source = null; @@ -403,11 +396,6 @@ } $pass_option_n = true; break; - case 'N': - $unicode_and_native = false; - $unicode_testing = false; - $ini_overwrites[] = 'unicode.semantics=0'; - break; case '--no-clean': $no_clean = true; break; @@ -440,17 +428,6 @@ case '--temp-urlbase': $temp_urlbase = $argv[++$i]; break; - case 'U': - $unicode_and_native = true; - // break; - case 'u': - $unicode_testing = true; - $ini_overwrites[] = 'unicode.semantics=1'; - $ini_overwrites[] = 'unicode.runtime_encoding=iso-8859-1'; - $ini_overwrites[] = 'unicode.script_encoding=utf-8'; - $ini_overwrites[] = 'unicode.output_encoding=utf-8'; - $ini_overwrites[] = 'unicode.from_error_mode=U_INVALID_SUBSTITUTE'; - break; case 'v': case '--verbose': $DETAILED = true; @@ -468,7 +445,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.350 $'."\n"; + echo '$Revision: 1.351 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -499,14 +476,8 @@ -d foo=bar Pass -d option to the php binary (Define INI entry foo with value 'bar'). --u Test with unicode.semantics set on. - --U Test in unicode and non unicode mode. - -m Test for memory leaks with Valgrind. --N Test with unicode.semantics set off. - -p Specify PHP executable to run. -q Quiet, no user interaction (same as environment NO
[PHP-CVS] cvs: php-src / run-tests.php
sfoxWed Jun 11 14:35:09 2008 UTC Modified files: /php-srcrun-tests.php Log: - code beauty (ws/cs) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.349&r2=1.350&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.349 php-src/run-tests.php:1.350 --- php-src/run-tests.php:1.349 Tue May 27 19:20:39 2008 +++ php-src/run-tests.php Wed Jun 11 14:35:08 2008 @@ -2,7 +2,7 @@ '; save_text($info_file, $php_info); $info_params = array(); - settings2array($ini_overwrites,$info_params); + settings2array($ini_overwrites, $info_params); settings2params($info_params); $php_info = `$php $pass_options $info_params "$info_file"`; define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`); + if ($php_cgi && $php != $php_cgi) { $php_info_cgi = `$php_cgi $pass_options $info_params -q "$info_file"`; $php_info_sep = "\n-"; @@ -208,14 +215,15 @@ } else { $php_cgi_info = ''; } + @unlink($info_file); $unicode = 1; define('TESTED_UNICODE', 1); // load list of enabled extensions - save_text($info_file, ''); - $exts_to_test = explode(',',`$php $pass_options $info_params "$info_file"`); + save_text($info_file, ''); + $exts_to_test = explode(', ',`$php $pass_options $info_params "$info_file"`); // check for extensions that need special handling and regenerate $info_params_ex = array( 'session' => array('session.auto_start=0'), @@ -223,11 +231,13 @@ 'zlib' => array('zlib.output_compression=Off'), 'xdebug' => array('xdebug.default_enable=0'), ); + foreach($info_params_ex as $ext => $ini_overwrites_ex) { if (in_array($ext, $exts_to_test)) { $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); } } + @unlink($info_file); // Write test context information. @@ -259,9 +269,11 @@ $compression = 0; $output_file = $CUR_DIR . '/php_test_results_' . @date('Ymd_Hi') . '.txt'; + if ($compression) { $output_file = 'compress.zlib://' . $output_file . '.gz'; } + $just_save_results = false; $leak_check = false; $unicode_and_native = false; @@ -277,38 +289,45 @@ $cfgtypes = array('show', 'keep'); $cfgfiles = array('skip', 'php', 'clean', 'out', 'diff', 'exp'); $cfg = array(); + foreach($cfgtypes as $type) { $cfg[$type] = array(); + foreach($cfgfiles as $file) { $cfg[$type][$file] = false; } } -if (getenv('TEST_PHP_ARGS')) -{ - if (!isset($argc) || !$argc || !isset($argv)) - { +if (getenv('TEST_PHP_ARGS')) { + + if (!isset($argc) || !$argc || !isset($argv)) { $argv = array(__FILE__); } + $argv = array_merge($argv, split(' ', getenv('TEST_PHP_ARGS'))); $argc = count($argv); } if (isset($argc) && $argc > 1) { + for ($i=1; $i<$argc; $i++) { $is_switch = false; $switch = substr($argv[$i],1,1); $repeat = substr($argv[$i],0,1) == '-'; + while ($repeat) { + if (!$is_switch) { $switch = substr($argv[$i],1,1); } + $is_switch = true; + if ($repeat) { foreach($cfgtypes as $type) { - if (strpos($switch, '--'.$type) === 0) { + if (strpos($switch, '--' . $type) === 0) { foreach($cfgfiles as $file) { - if ($switch == '--'.$type.'-'.$file) { + if ($switch == '--' . $type.'-' . $file) { $cfg[$type][$file] = true; $is_switch = false; break; @@ -317,11 +336,14 @@ } } } + if (!$is_switch) { $is_switch = true; break; } + $repeat = false; + switch($switch) { case 'r': case 'l': @@ -446,7 +468,7 @@ $html_output = is_resource($html_file); break; case '--version': -
[PHP-CVS] cvs: php-src / run-tests.php
felipe Tue May 27 19:20:40 2008 UTC Modified files: /php-srcrun-tests.php Log: - Suppressed fwrite() warning. - Removed the doubled test name in borked message. - Fixed the bogus borked message when test file is empty or fgets() fails. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.348&r2=1.349&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.348 php-src/run-tests.php:1.349 --- php-src/run-tests.php:1.348 Sun May 25 16:12:27 2008 +++ php-src/run-tests.php Tue May 27 19:20:39 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.348 2008/05/25 16:12:27 zoe Exp $ */ +/* $Id: run-tests.php,v 1.349 2008/05/27 19:20:39 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -193,7 +193,6 @@ PHP_VERSION : " , phpversion() , " ZEND_VERSION: " , zend_version() , " PHP_OS : " , PHP_OS , " - " , php_uname() , " -UNICODE : " , (ini_get("unicode.semantics") ? "ON" : "OFF") , " INI actual : " , realpath(get_cfg_var("cfg_file_path")) , " More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>'; save_text($info_file, $php_info); @@ -447,7 +446,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.348 $'."\n"; + echo '$Revision: 1.349 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -926,7 +925,7 @@ return false; if (!is_null($stdin)) { - fwrite($pipes[0], $stdin); + @fwrite($pipes[0], $stdin); } fclose($pipes[0]); @@ -1061,12 +1060,16 @@ $bork_info = ''; if (!feof($fp)) { $line = fgets($fp); + if ($line === false) { + $bork_info = "cannot read test"; + $borked = true; + } } else { - $bork_info = "empty test [$file]"; + $bork_info = "empty test"; $borked = true; } - if (strncmp('--TEST--', $line, 8)) { - $bork_info = "tests must start with --TEST-- [$file]"; + if (!$borked && strncmp('--TEST--', $line, 8)) { + $bork_info = "tests must start with --TEST--"; $borked = true; } $section = 'TEST'; @@ -1103,40 +1106,42 @@ // the redirect section allows a set of tests to be reused outside of // a given test dir - if (@count($section_text['REDIRECTTEST']) == 1) { - if ($IN_REDIRECT) { - $borked = true; - $bork_info = "Can't redirect a test from within a redirected test"; - } else { - $borked = false; - } - } else { - if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) { - $bork_info = "missing section --FILE--"; - $borked = true; - } - if (@count($section_text['FILEEOF']) == 1) { - $section_text['FILE'] = preg_replace("/[\r\n]+$/", '', $section_text['FILEEOF']); - unset($section_text['FILEEOF']); - } - if (@count($section_text['FILE_EXTERNAL']) == 1) { - // don't allow tests to retrieve files from anywhere but this subdirectory - $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . trim(str_replace('..', '', $section_text['FILE_EXTERNAL'])); - if (@file_exists($section_text['FILE_EXTERNAL'])) { - $section_text['FILE'] = file_get_contents($section_text['FILE_EXTERNAL']); - unset($section_text['FILE_EXTERNAL']); + if (!$borked) { + if (@count($section_text['REDIRECTTEST']) == 1) { + if ($IN_REDIRECT) { + $borked = true; + $bork_info = "Can't redirect a test from within a redirected test"; } else { - $bork_info = "could not load --FILE_EXTERNAL-- " . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']); + $borked = false; + } + } else { +
[PHP-CVS] cvs: php-src / run-tests.php
zoe Sun May 25 16:12:28 2008 UTC Modified files: /php-srcrun-tests.php Log: Added --XFAIL-- section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.347&r2=1.348&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.347 php-src/run-tests.php:1.348 --- php-src/run-tests.php:1.347 Wed May 21 14:01:31 2008 +++ php-src/run-tests.php Sun May 25 16:12:27 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.347 2008/05/21 14:01:31 felipe Exp $ */ +/* $Id: run-tests.php,v 1.348 2008/05/25 16:12:27 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -251,7 +251,7 @@ $test_files = array(); $redir_tests = array(); $test_results = array(); -$PHP_FAILED_TESTS = array('BORKED' => array(), 'FAILED' => array(), 'WARNED' => array(), 'LEAKED' => array()); +$PHP_FAILED_TESTS = array('BORKED' => array(), 'FAILED' => array(), 'WARNED' => array(), 'LEAKED' => array(), 'XFAILED' => array()); // If parameters given assume they represent selected tests to run. $failed_tests_file= false; @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.347 $'."\n"; + echo '$Revision: 1.348 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -717,7 +717,7 @@ /* We got failed Tests, offer the user to send an e-mail to QA team, unless NO_INTERACTION is set */ if (!getenv('NO_INTERACTION')) { $fp = fopen("php://stdin", "r+"); - if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED']) { + if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED']|| $sum_results['XFAILED']) { echo "\nYou may have found a problem in PHP."; } echo "\nWe would like to send this report automatically to the\n"; @@ -996,7 +996,7 @@ { $pu = $unicode_and_native && $unicode_semantics ? '.u' : ''; $test_results[$index.$pu] = $result; - if ($failed_tests_file && ($result == 'FAILED' || $result == 'WARNED' || $result == 'LEAKED')) + if ($failed_tests_file && ($result== 'XFAILED' || $result == 'FAILED' || $result == 'WARNED' || $result == 'LEAKED')) { fwrite($failed_tests_file, "$index\n"); } @@ -1693,7 +1693,11 @@ $restype[] = 'WARN'; } if (!$passed) { - $restype[] = 'FAIL'; + if(isset($section_text['XFAIL'])) { +$restype[] = 'XFAIL'; +}else{ +$restype[] = 'FAIL'; +} } if (!$passed) { @@ -1907,7 +1911,7 @@ $n_total = count($test_results); $n_total += $ignored_by_ext; - $sum_results = array('PASSED'=>0, 'WARNED'=>0, 'SKIPPED'=>0, 'FAILED'=>0, 'BORKED'=>0, 'LEAKED'=>0); + $sum_results = array('PASSED'=>0, 'WARNED'=>0, 'SKIPPED'=>0, 'FAILED'=>0, 'BORKED'=>0, 'LEAKED'=>0, 'XFAILED' => 0); foreach ($test_results as $v) { $sum_results[$v]++; } @@ -1926,10 +1930,11 @@ if ($x_total) { $x_warned = (100.0 * $sum_results['WARNED']) / $x_total; $x_failed = (100.0 * $sum_results['FAILED']) / $x_total; + $x_xfailed = (100.0 * $sum_results['XFAILED']) / $x_total; $x_leaked = (100.0 * $sum_results['LEAKED']) / $x_total; $x_passed = (100.0 * $sum_results['PASSED']) / $x_total; } else { - $x_warned = $x_failed = $x_passed = $x_leaked = 0; + $x_warned = $x_failed = $x_passed = $x_leaked = $x_failed = 0; } $summary = ""; @@ -1953,7 +1958,9 @@ $summary .= " Tests skipped : " . sprintf("%4d (%5.1f%%)",$sum_results['SKIPPED'],$percent_results['SKIPPED']) . " Tests warned: " . sprintf("%4d (%5.1f%%)",$sum_results['WARNED'], $percent_results['WARNED']) . " " . sprintf("(%5.1f%%)",$x_warned) . " -Tests failed: " . sprintf("%4d (%5.1f%%)",$sum_results['FAILED'], $percent_results['FAILED']) . " " . sprintf("(%5.1f%%)",$x_failed); +Tests failed: " . sprintf("%4d (%5.1f%%)",$sum_results['FAILED'], $percent_results['FAILED']) . " " . sprintf("(%5.1f%%)",$
[PHP-CVS] cvs: php-src / run-tests.php
felipe Wed May 21 14:01:31 2008 UTC Modified files: /php-srcrun-tests.php Log: - Remove check for unicode.semantics http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.346&r2=1.347&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.346 php-src/run-tests.php:1.347 --- php-src/run-tests.php:1.346 Wed May 21 13:02:35 2008 +++ php-src/run-tests.php Wed May 21 14:01:31 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.346 2008/05/21 13:02:35 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.347 2008/05/21 14:01:31 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -211,8 +211,8 @@ } @unlink($info_file); - $unicode = `$php $pass_options $info_params -r "echo ini_get('unicode.semantics');"`; - define('TESTED_UNICODE', strcasecmp($unicode,"on") == 0 || $unicode == 1); + $unicode = 1; + define('TESTED_UNICODE', 1); // load list of enabled extensions save_text($info_file, ''); @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.346 $'."\n"; + echo '$Revision: 1.347 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Wed May 21 13:02:35 2008 UTC Modified files: /php-srcrun-tests.php Log: fix run-tests.php (Felipe) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.345&r2=1.346&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.345 php-src/run-tests.php:1.346 --- php-src/run-tests.php:1.345 Mon Mar 17 17:20:27 2008 +++ php-src/run-tests.php Wed May 21 13:02:35 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.345 2008/03/17 17:20:27 nlopess Exp $ */ +/* $Id: run-tests.php,v 1.346 2008/05/21 13:02:35 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.345 $'."\n"; + echo '$Revision: 1.346 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -920,12 +920,12 @@ 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w') - ), $pipes, null, $env, array("suppress_errors" => true)); + ), $pipes, null, $env, array("suppress_errors" => true, "binary_pipes" => true)); if (!$proc) return false; - if (is_string($stdin)) { + if (!is_null($stdin)) { fwrite($pipes[0], $stdin); } fclose($pipes[0]); @@ -1655,7 +1655,7 @@ $wanted = trim($section_text['EXPECT']); if ($unicode_semantics && is_unicode($wanted)) { /* workaround until preg_replace() or str_replace() are upgraded */ - $wanted = unicode_encode($wanted, ini_get('unicode.output_encoding')); + $wanted = unicode_encode($wanted, ini_get('unicode.output_encoding') ?: 'utf-8'); } $wanted = preg_replace('/\r\n/',"\n",$wanted); show_file_block('exp', $wanted); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
nlopess Mon Mar 17 17:20:27 2008 UTC Modified files: /php-srcrun-tests.php Log: MFB: detect duplicate sections http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.344&r2=1.345&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.344 php-src/run-tests.php:1.345 --- php-src/run-tests.php:1.344 Wed Mar 5 20:11:35 2008 +++ php-src/run-tests.php Mon Mar 17 17:20:27 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.344 2008/03/05 20:11:35 lstrojny Exp $ */ +/* $Id: run-tests.php,v 1.345 2008/03/17 17:20:27 nlopess Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.344 $'."\n"; + echo '$Revision: 1.345 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1053,16 +1053,7 @@ "; // Load the sections of the test file. - $section_text = array( - 'TEST' => '', - 'SKIPIF' => '', - 'GET'=> '', - 'COOKIE' => '', - 'POST_RAW' => '', - 'POST' => '', - 'UPLOAD' => '', - 'ARGS' => '', - ); + $section_text = array('TEST' => ''); $fp = fopen($file, "rt") or error("Cannot open test file: $file"); @@ -1087,6 +1078,12 @@ // Match the beginning of a section. if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { $section = $r[1]; + + if (isset($section_text[$section])) { + $bork_info = "duplicated $section section"; + $borked= true; + } + $section_text[$section] = ''; $secfile = $section == 'FILE' || $section == 'FILEEOF' || $section == 'FILE_EXTERNAL'; $secdone = false; @@ -1454,7 +1451,7 @@ $env['HTTP_COOKIE'] = ''; } - $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + $args = isset($section_text['ARGS']) ? ' -- '.$section_text['ARGS'] : ''; if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) { $post = trim($section_text['POST_RAW']); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
lstrojnyWed Mar 5 20:11:36 2008 UTC Modified files: /php-srcrun-tests.php Log: Using new magic constant __DIR__ in run-tests.php http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.343&r2=1.344&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.343 php-src/run-tests.php:1.344 --- php-src/run-tests.php:1.343 Sat Feb 23 18:41:31 2008 +++ php-src/run-tests.php Wed Mar 5 20:11:35 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.343 2008/02/23 18:41:31 felipe Exp $ */ +/* $Id: run-tests.php,v 1.344 2008/03/05 20:11:35 lstrojny Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -186,7 +186,7 @@ global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test, $leak_check, $valgrind_header; // Get info from php - $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; + $info_file = __DIR__ . '/run-test-info.php'; @unlink($info_file); $php_info = 'http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
felipe Sat Feb 23 18:41:31 2008 UTC Modified files: /php-srcrun-tests.php Log: New E_ALL value http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.342&r2=1.343&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.342 php-src/run-tests.php:1.343 --- php-src/run-tests.php:1.342 Fri Feb 8 16:47:20 2008 +++ php-src/run-tests.php Sat Feb 23 18:41:31 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.342 2008/02/08 16:47:20 nlopess Exp $ */ +/* $Id: run-tests.php,v 1.343 2008/02/23 18:41:31 felipe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -163,7 +163,7 @@ 'open_basedir=', 'disable_functions=', 'output_buffering=Off', - 'error_reporting=8191', + 'error_reporting=16383', 'display_errors=1', 'display_startup_errors=1', 'log_errors=0', @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.342 $'."\n"; + echo '$Revision: 1.343 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
nlopess Fri Feb 8 16:47:20 2008 UTC Modified files: /php-srcrun-tests.php Log: fix ===DONE=== with windows EOLs http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.341&r2=1.342&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.341 php-src/run-tests.php:1.342 --- php-src/run-tests.php:1.341 Tue Jan 15 13:03:22 2008 +++ php-src/run-tests.php Fri Feb 8 16:47:20 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.341 2008/01/15 13:03:22 helly Exp $ */ +/* $Id: run-tests.php,v 1.342 2008/02/08 16:47:20 nlopess Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -447,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.341 $'."\n"; + echo '$Revision: 1.342 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1099,7 +1099,7 @@ } // End of actual test? - if ($secfile && preg_match('/^===DONE===$/', $line)) { + if ($secfile && preg_match('/^===DONE===\s*$/', $line)) { $secdone = true; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Tue Jan 15 13:03:22 2008 UTC Modified files: /php-srcrun-tests.php Log: - Detect versions of valgrind that have an appendix to their verion number - Show whether valgrind is being used in test header http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.340&r2=1.341&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.340 php-src/run-tests.php:1.341 --- php-src/run-tests.php:1.340 Sun Jan 6 16:47:50 2008 +++ php-src/run-tests.php Tue Jan 15 13:03:22 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.340 2008/01/06 16:47:50 helly Exp $ */ +/* $Id: run-tests.php,v 1.341 2008/01/15 13:03:22 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -77,6 +77,7 @@ set_time_limit(0); $valgrind_version = 0; +$valgrind_header = ''; // delete as much output buffers as possible while(@ob_end_clean()); @@ -182,7 +183,7 @@ function write_information($show_html) { - global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test; + global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test, $leak_check, $valgrind_header; // Get info from php $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; @@ -240,6 +241,7 @@ echo "{$test_dir}\n "; } echo " +VALGRIND: " . ($leak_check ? $valgrind_header : 'Not used') . " = "; } @@ -361,6 +363,18 @@ //case 'l' case 'm': $leak_check = true; + $valgrind_cmd = "valgrind --version"; + $valgrind_header = system_with_timeout($valgrind_cmd); + $replace_count = 0; + if (!$valgrind_header) { + error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); + } else { + $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(-\w+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count); + if ($replace_count != 1 || !is_numeric($valgrind_version)) { + error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed."); + } + $valgrind_header = trim($valgrind_header); + } break; case 'n': if (!$pass_option_n) { @@ -433,7 +447,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.340 $'."\n"; + echo '$Revision: 1.341 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1498,20 +1512,6 @@ if ($leak_check) { $env['USE_ZEND_ALLOC'] = '0'; - if (!$valgrind_version) { - $valgrind_cmd = "valgrind --version"; - $out = system_with_timeout($valgrind_cmd); - $replace_count = 0; - - if (!$out) { - error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); - } else { - $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(\s+)/", '$1$2$3', $out, 1, $replace_count); - if ($replace_count != 1 || !is_numeric($valgrind_version)) { - error("Valgrind returned invalid version info (\"$out\"), cannot proceed."); - } - } - } if ($valgrind_version >= 330) { /* valgrind 3.3.0+ doesn't have --log-file-exactly option */ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe,
[PHP-CVS] cvs: php-src / run-tests.php
helly Sun Jan 6 16:47:50 2008 UTC Modified files: /php-srcrun-tests.php Log: - Show info for CL and CGI if both are going to be used http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.339&r2=1.340&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.339 php-src/run-tests.php:1.340 --- php-src/run-tests.php:1.339 Sat Jan 5 21:39:39 2008 +++ php-src/run-tests.php Sun Jan 6 16:47:50 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.339 2008/01/05 21:39:39 cellog Exp $ */ +/* $Id: run-tests.php,v 1.340 2008/01/06 16:47:50 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -95,11 +95,22 @@ // Require the explicit specification. // Otherwise we could end up testing the wrong file! +$php = NULL; +$php_cgi = NULL; + if (getenv('TEST_PHP_EXECUTABLE')) { $php = getenv('TEST_PHP_EXECUTABLE'); if ($php=='auto') { $php = $cwd.'/sapi/cli/php'; putenv("TEST_PHP_EXECUTABLE=$php"); + if (!getenv('TEST_PHP_CGI_EXECUTABLE')) { + $php_cgi = $cwd.'/sapi/cgi/php-cgi'; + if (file_exists($php_cgi)) { + putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi"); + } else { + $php_cgi = NULL; + } + } } $environment['TEST_PHP_EXECUTABLE'] = $php; } @@ -171,7 +182,7 @@ function write_information($show_html) { - global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test; + global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test; // Get info from php $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; @@ -189,8 +200,15 @@ settings2array($ini_overwrites,$info_params); settings2params($info_params); $php_info = `$php $pass_options $info_params "$info_file"`; - @unlink($info_file); define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`); + if ($php_cgi && $php != $php_cgi) { + $php_info_cgi = `$php_cgi $pass_options $info_params -q "$info_file"`; + $php_info_sep = "\n-"; + $php_cgi_info = "$php_info_sep\nPHP : $php_cgi $php_info_cgi$php_info_sep"; + } else { + $php_cgi_info = ''; + } + @unlink($info_file); $unicode = `$php $pass_options $info_params -r "echo ini_get('unicode.semantics');"`; define('TESTED_UNICODE', strcasecmp($unicode,"on") == 0 || $unicode == 1); @@ -215,8 +233,8 @@ // Write test context information. echo " = +PHP : $php $php_info $php_cgi_info CWD : $cwd -PHP : $php $php_info Extra dirs : "; foreach ($user_tests as $test_dir) { echo "{$test_dir}\n "; @@ -415,7 +433,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.339 $'."\n"; + echo '$Revision: 1.340 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Please also update http://qa.php.net/write-test.php (in cvs, under the qaweb module). Thanks, Nuno - Original Message - From: "Greg Beaver" <[EMAIL PROTECTED]> To: Sent: Saturday, January 05, 2008 9:04 PM Subject: [PHP-CVS] cvs: php-src / run-tests.php cellog Sat Jan 5 21:04:55 2008 UTC Modified files: /php-src run-tests.php Log: implement --FILE_EXTERNAL-- section for using an external file as --FILE--, use CGI for --EXPECTHEADERS--, fix --POST_RAW-- http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.337&r2=1.338&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.337 php-src/run-tests.php:1.338 --- php-src/run-tests.php:1.337 Tue Jan 1 06:22:15 2008 +++ php-src/run-tests.php Sat Jan 5 21:04:55 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.337 2008/01/01 06:22:15 sebastian Exp $ */ +/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.337 $'."\n"; + echo '$Revision: 1.338 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1056,7 +1056,7 @@ if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { $section = $r[1]; $section_text[$section] = ''; - $secfile = $section == 'FILE' || $section == 'FILEEOF'; + $secfile = $section == 'FILE' || $section == 'FILEEOF' || $section == 'FILE_EXTERNAL'; $secdone = false; continue; } @@ -1082,7 +1082,7 @@ $borked = false; } } else { - if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) != 1) { + if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) { $bork_info = "missing section --FILE--"; $borked = true; } @@ -1090,6 +1090,17 @@ $section_text['FILE'] = preg_replace("/[\r\n]+$/", '', $section_text['FILEEOF']); unset($section_text['FILEEOF']); } + if (@count($section_text['FILE_EXTERNAL']) == 1) { + // don't allow tests to retrieve files from anywhere but this subdirectory + $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . trim(str_replace('..', '', $section_text['FILE_EXTERNAL'])); + if (@file_exists($section_text['FILE_EXTERNAL'])) { + $section_text['FILE'] = file_get_contents($section_text['FILE_EXTERNAL']); + unset($section_text['FILE_EXTERNAL']); + } else { + $bork_info = "could not load --FILE_EXTERNAL-- " . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']); + $borked = true; + } + } if ((@count($section_text['EXPECT']) + @count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) { $bork_info = "missing section --EXPECT--, --EXPECTF-- or --EXPECTREGEX--"; $borked = true; @@ -1120,7 +1131,7 @@ $tested = trim($section_text['TEST']); /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi .' -C '; @@ -1418,12 +1429,15 @@ $raw_lines = explode("\n", $post); $request = ''; + $started = false; foreach ($raw_lines as $line) { if (empty($env['CONTENT_TYPE']) && preg_match('/^Content-Type:(.*)/i', $line, $res)) { $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); continue; } - $request .= $line . "\n"; + if ($started) $request .= "\n"; + $started = true; + $request .= $line; } $env['CONTENT_LENGTH'] = strlen($request); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
cellog Sat Jan 5 21:39:39 2008 UTC Modified files: /php-srcrun-tests.php Log: remove potential preg warnings if --EXPECTHEADERS-- is combined with --EXPECTF-- or --EXPECTRE-- http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.338&r2=1.339&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.338 php-src/run-tests.php:1.339 --- php-src/run-tests.php:1.338 Sat Jan 5 21:04:55 2008 +++ php-src/run-tests.php Sat Jan 5 21:39:39 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog Exp $ */ +/* $Id: run-tests.php,v 1.339 2008/01/05 21:39:39 cellog Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.338 $'."\n"; + echo '$Revision: 1.339 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1667,7 +1667,7 @@ $wanted = $wanted_headers . "\n--HEADERS--\n" . $wanted; $output = $output_headers . "\n--HEADERS--\n" . $output; if (isset($wanted_re)) { - $wanted_re = $wanted_headers . "\n--HEADERS--\n" . $wanted_re; + $wanted_re = preg_quote($wanted_headers . "\n--HEADERS--\n", '/') . $wanted_re; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
cellog Sat Jan 5 21:04:55 2008 UTC Modified files: /php-srcrun-tests.php Log: implement --FILE_EXTERNAL-- section for using an external file as --FILE--, use CGI for --EXPECTHEADERS--, fix --POST_RAW-- http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.337&r2=1.338&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.337 php-src/run-tests.php:1.338 --- php-src/run-tests.php:1.337 Tue Jan 1 06:22:15 2008 +++ php-src/run-tests.php Sat Jan 5 21:04:55 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.337 2008/01/01 06:22:15 sebastian Exp $ */ +/* $Id: run-tests.php,v 1.338 2008/01/05 21:04:55 cellog Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.337 $'."\n"; + echo '$Revision: 1.338 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1056,7 +1056,7 @@ if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { $section = $r[1]; $section_text[$section] = ''; - $secfile = $section == 'FILE' || $section == 'FILEEOF'; + $secfile = $section == 'FILE' || $section == 'FILEEOF' || $section == 'FILE_EXTERNAL'; $secdone = false; continue; } @@ -1082,7 +1082,7 @@ $borked = false; } } else { - if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) != 1) { + if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) { $bork_info = "missing section --FILE--"; $borked = true; } @@ -1090,6 +1090,17 @@ $section_text['FILE'] = preg_replace("/[\r\n]+$/", '', $section_text['FILEEOF']); unset($section_text['FILEEOF']); } + if (@count($section_text['FILE_EXTERNAL']) == 1) { + // don't allow tests to retrieve files from anywhere but this subdirectory + $section_text['FILE_EXTERNAL'] = dirname($file) . '/' . trim(str_replace('..', '', $section_text['FILE_EXTERNAL'])); + if (@file_exists($section_text['FILE_EXTERNAL'])) { + $section_text['FILE'] = file_get_contents($section_text['FILE_EXTERNAL']); + unset($section_text['FILE_EXTERNAL']); + } else { + $bork_info = "could not load --FILE_EXTERNAL-- " . dirname($file) . '/' . trim($section_text['FILE_EXTERNAL']); + $borked = true; + } + } if ((@count($section_text['EXPECT']) + @count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) { $bork_info = "missing section --EXPECT--, --EXPECTF-- or --EXPECTREGEX--"; $borked = true; @@ -1120,7 +1131,7 @@ $tested = trim($section_text['TEST']); /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi .' -C '; @@ -1418,12 +1429,15 @@ $raw_lines = explode("\n", $post); $request = ''; + $started = false; foreach ($raw_lines as $line) { if (empty($env['CONTENT_TYPE']) && preg_match('/^Content-Type:(.*)/i', $line, $res)) { $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); continue; } - $request .= $line . "\n"; + if ($started) $request .= "\n"; + $started = true; + $request .= $line; }
[PHP-CVS] cvs: php-src / run-tests.php server-tests.php /sapi/cli php.1.in
sebastian Tue Jan 1 06:22:15 2008 UTC Modified files: /php-srcrun-tests.php server-tests.php /php-src/sapi/cli php.1.in Log: MFB: Leftover: Bump copyright year. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.336&r2=1.337&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.336 php-src/run-tests.php:1.337 --- php-src/run-tests.php:1.336 Tue Dec 25 12:06:53 2007 +++ php-src/run-tests.php Tue Jan 1 06:22:15 2008 @@ -4,7 +4,7 @@ +--+ | PHP Version 5| +--+ - | Copyright (c) 1997-2007 The PHP Group| + | Copyright (c) 1997-2008 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.336 2007/12/25 12:06:53 dmitry Exp $ */ +/* $Id: run-tests.php,v 1.337 2008/01/01 06:22:15 sebastian Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.336 $'."\n"; + echo '$Revision: 1.337 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; http://cvs.php.net/viewvc.cgi/php-src/server-tests.php?r1=1.7&r2=1.8&diff_format=u Index: php-src/server-tests.php diff -u php-src/server-tests.php:1.7 php-src/server-tests.php:1.8 --- php-src/server-tests.php:1.7Mon May 28 23:00:25 2007 +++ php-src/server-tests.phpTue Jan 1 06:22:15 2008 @@ -3,7 +3,7 @@ +--+ | PHP Version 5| +--+ - | Copyright (c) 1997-2007 The PHP Group| + | Copyright (c) 1997-2008 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php.1.in?r1=1.20&r2=1.21&diff_format=u Index: php-src/sapi/cli/php.1.in diff -u php-src/sapi/cli/php.1.in:1.20 php-src/sapi/cli/php.1.in:1.21 --- php-src/sapi/cli/php.1.in:1.20 Mon Apr 23 20:53:55 2007 +++ php-src/sapi/cli/php.1.in Tue Jan 1 06:22:15 2008 @@ -1,4 +1,4 @@ -.TH PHP 1 "2007" "The PHP Group" "Scripting Language" +.TH PHP 1 "2008" "The PHP Group" "Scripting Language" .SH NAME .TP 15 php \- PHP Command Line Interface 'CLI' -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
dmitry Tue Dec 25 12:06:53 2007 UTC Modified files: /php-srcrun-tests.php Log: Fixed %f regex http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.335&r2=1.336&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.335 php-src/run-tests.php:1.336 --- php-src/run-tests.php:1.335 Mon Dec 24 04:20:15 2007 +++ php-src/run-tests.php Tue Dec 25 12:06:53 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.335 2007/12/24 04:20:15 kraghuba Exp $ */ +/* $Id: run-tests.php,v 1.336 2007/12/25 12:06:53 dmitry Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.335 $'."\n"; + echo '$Revision: 1.336 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1600,7 +1600,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
@@ -1600,7 +1600,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression Please use [Ee] there instead of E|e. That is much more intuitive on what it'll match. Nuno -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
kraghubaMon Dec 24 04:20:16 2007 UTC Modified files: /php-srcrun-tests.php Log: Changing the regex for %f so the it will match e-, e+ and e. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.334&r2=1.335&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.334 php-src/run-tests.php:1.335 --- php-src/run-tests.php:1.334 Mon Dec 17 11:34:55 2007 +++ php-src/run-tests.php Mon Dec 24 04:20:15 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.334 2007/12/17 11:34:55 bjori Exp $ */ +/* $Id: run-tests.php,v 1.335 2007/12/24 04:20:15 kraghuba Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.334 $'."\n"; + echo '$Revision: 1.335 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1600,7 +1600,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
bjori Mon Dec 17 11:34:55 2007 UTC Modified files: /php-srcrun-tests.php Log: MFB5.3: - Allow to specify php executable on commandline MFB5.3: - Allow to check the out,exp and diff results on console while executing the tests http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.333&r2=1.334&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.333 php-src/run-tests.php:1.334 --- php-src/run-tests.php:1.333 Wed Dec 12 09:20:41 2007 +++ php-src/run-tests.php Mon Dec 17 11:34:55 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.333 2007/12/12 09:20:41 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.334 2007/12/17 11:34:55 bjori Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -113,8 +113,10 @@ $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi; } -if ($argc !=2 || ($argv[1] != '-h' && $argv[1] != '-help' && $argv != '--help')) +function verify_config() { + global $php; + if (empty($php) || !file_exists($php)) { error("environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!"); } @@ -254,7 +256,7 @@ $no_clean = false; $cfgtypes = array('show', 'keep'); -$cfgfiles = array('skip', 'php', 'clean'); +$cfgfiles = array('skip', 'php', 'clean', 'out', 'diff', 'exp'); $cfg = array(); foreach($cfgtypes as $type) { $cfg[$type] = array(); @@ -279,11 +281,28 @@ $switch = substr($argv[$i],1,1); $repeat = substr($argv[$i],0,1) == '-'; while ($repeat) { - $repeat = false; if (!$is_switch) { $switch = substr($argv[$i],1,1); } $is_switch = true; + if ($repeat) { + foreach($cfgtypes as $type) { + if (strpos($switch, '--'.$type) === 0) { + foreach($cfgfiles as $file) { + if ($switch == '--'.$type.'-'.$file) { + $cfg[$type][$file] = true; + $is_switch = false; + break; + } + } + } + } + } + if (!$is_switch) { + $is_switch = true; + break; + } + $repeat = false; switch($switch) { case 'r': case 'l': @@ -321,15 +340,6 @@ $cfg['keep'][$file] = true; } break; - case '--keep-skip': - $cfg['keep']['skip'] = true; - break; - case '--keep-php': - $cfg['keep']['php'] = true; - break; - case '--keep-clean': - $cfg['keep']['clean'] = true; - break; //case 'l' case 'm': $leak_check = true; @@ -348,6 +358,10 @@ case '--no-clean': $no_clean = true; break; + case 'p': + $php = $argv[++$i]; + putenv("TEST_PHP_EXECUTABLE=$php"); + break; case 'q': putenv('NO_INTERACTION=1'); break; @@ -361,15 +375,6 @@ $cfg['show'][$file] = true; } break; - case '--show-skip': - $cfg['show']['skip'] = true; - break; - case '--show-php': - $cfg['show
Re: [PHP-CVS] cvs: php-src / run-tests.php
Thank you :) Nuno P.S.: I'll upgrade valgrind in the gcov box later next week - Original Message - On 12.12.2007 23:13, Nuno Lopes wrote: Ah you are fast (less than 24 hours :)! Thank you Tony for the patch. Hehe, no problem =) Can you please also merge it to PHP 5.2, so that I can upgrade valgrind in the gcov machine? Sure. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
On 12.12.2007 23:13, Nuno Lopes wrote: > Ah you are fast (less than 24 hours :)! Thank you Tony for the patch. Hehe, no problem =) > Can you please also merge it to PHP 5.2, so that I can upgrade valgrind in > the gcov machine? Sure. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / run-tests.php
Ah you are fast (less than 24 hours :)! Thank you Tony for the patch. Can you please also merge it to PHP 5.2, so that I can upgrade valgrind in the gcov machine? Thanks, Nuno - Original Message - From: "Antony Dovgal" <[EMAIL PROTECTED]> To: Sent: Wednesday, December 12, 2007 9:20 AM Subject: [PHP-CVS] cvs: php-src / run-tests.php tony2001 Wed Dec 12 09:20:42 2007 UTC Modified files: /php-src run-tests.php Log: add support for Valgrind 3.3.0 (which doesn't have --log-file-exactly option) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.332&r2=1.333&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.332 php-src/run-tests.php:1.333 --- php-src/run-tests.php:1.332 Wed Nov 21 08:20:11 2007 +++ php-src/run-tests.php Wed Dec 12 09:20:41 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.332 2007/11/21 08:20:11 jani Exp $ */ +/* $Id: run-tests.php,v 1.333 2007/12/12 09:20:41 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -76,6 +76,8 @@ $cwd = getcwd(); set_time_limit(0); +$valgrind_version = 0; + // delete as much output buffers as possible while(@ob_end_clean()); if (ob_get_level()) echo "Not all buffers were deleted.\n"; @@ -408,7 +410,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.332 $'."\n"; + echo '$Revision: 1.333 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -972,6 +974,7 @@ global $leak_check, $temp_source, $temp_target, $cfg, $environment; global $no_clean; global $unicode_and_native; + global $valgrind_version; $temp_filenames = null; $org_file = $file; @@ -1441,7 +1444,26 @@ if ($leak_check) { $env['USE_ZEND_ALLOC'] = '0'; - $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd"; + if (!$valgrind_version) { + $valgrind_cmd = "valgrind --version"; + $out = system_with_timeout($valgrind_cmd); + $replace_count = 0; + + if (!$out) { + error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); + } else { + $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(\s+)/", '$1$2$3', $out, 1, $replace_count); + if ($replace_count != 1 || !is_numeric($valgrind_version)) { + error("Valgrind returned invalid version info (\"$out\"), cannot proceed."); + } + } + } + if ($valgrind_version >= 330) { + /* valgrind 3.3.0+ doesn't have --log-file-exactly option */ + $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd"; + } else { + $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd"; + } } else { $env['USE_ZEND_ALLOC'] = '1'; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Wed Dec 12 09:20:42 2007 UTC Modified files: /php-srcrun-tests.php Log: add support for Valgrind 3.3.0 (which doesn't have --log-file-exactly option) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.332&r2=1.333&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.332 php-src/run-tests.php:1.333 --- php-src/run-tests.php:1.332 Wed Nov 21 08:20:11 2007 +++ php-src/run-tests.php Wed Dec 12 09:20:41 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.332 2007/11/21 08:20:11 jani Exp $ */ +/* $Id: run-tests.php,v 1.333 2007/12/12 09:20:41 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -76,6 +76,8 @@ $cwd = getcwd(); set_time_limit(0); +$valgrind_version = 0; + // delete as much output buffers as possible while(@ob_end_clean()); if (ob_get_level()) echo "Not all buffers were deleted.\n"; @@ -408,7 +410,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.332 $'."\n"; + echo '$Revision: 1.333 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -972,6 +974,7 @@ global $leak_check, $temp_source, $temp_target, $cfg, $environment; global $no_clean; global $unicode_and_native; + global $valgrind_version; $temp_filenames = null; $org_file = $file; @@ -1441,7 +1444,26 @@ if ($leak_check) { $env['USE_ZEND_ALLOC'] = '0'; - $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd"; + if (!$valgrind_version) { + $valgrind_cmd = "valgrind --version"; + $out = system_with_timeout($valgrind_cmd); + $replace_count = 0; + + if (!$out) { + error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed."); + } else { + $valgrind_version = preg_replace("/valgrind-([0-9])\.([0-9])\.([0-9]+)(\s+)/", '$1$2$3', $out, 1, $replace_count); + if ($replace_count != 1 || !is_numeric($valgrind_version)) { + error("Valgrind returned invalid version info (\"$out\"), cannot proceed."); + } + } + } + if ($valgrind_version >= 330) { + /* valgrind 3.3.0+ doesn't have --log-file-exactly option */ + $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd"; + } else { + $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd"; + } } else { $env['USE_ZEND_ALLOC'] = '1'; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
janiWed Nov 21 08:20:11 2007 UTC Modified files: /php-srcrun-tests.php Log: - Fixed bug #43035: ignore_repeated_errors=On causes lot of tests to fail http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.331&r2=1.332&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.331 php-src/run-tests.php:1.332 --- php-src/run-tests.php:1.331 Mon Nov 12 18:22:10 2007 +++ php-src/run-tests.php Wed Nov 21 08:20:11 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.331 2007/11/12 18:22:10 zoe Exp $ */ +/* $Id: run-tests.php,v 1.332 2007/11/21 08:20:11 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -162,6 +162,7 @@ 'auto_prepend_file=', 'auto_append_file=', 'magic_quotes_runtime=0', + 'ignore_repeated_errors=0', ); function write_information($show_html) @@ -407,7 +408,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.331 $'."\n"; + echo '$Revision: 1.332 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
zoe Mon Nov 12 18:22:10 2007 UTC Modified files: /php-srcrun-tests.php Log: Changing the regex for %f so the it will match E-, E+ and E. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.330&r2=1.331&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.330 php-src/run-tests.php:1.331 --- php-src/run-tests.php:1.330 Fri Sep 14 15:36:29 2007 +++ php-src/run-tests.php Mon Nov 12 18:22:10 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.330 2007/09/14 15:36:29 nlopess Exp $ */ +/* $Id: run-tests.php,v 1.331 2007/11/12 18:22:10 zoe Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -407,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.330 $'."\n"; + echo '$Revision: 1.331 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1557,7 +1557,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E-?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php /ext/bz2/tests 005.phpt /ext/standard/tests/general_functions phpcredits.phpt phpinfo.phpt /ext/standard/tests/strings sha1.phpt /ext/zlib/tests 005.phpt 006
nlopess Fri Sep 14 15:36:29 2007 UTC Modified files: /php-srcrun-tests.php /php-src/ext/bz2/tests 005.phpt /php-src/ext/standard/tests/general_functions phpcredits.phpt phpinfo.phpt /php-src/ext/standard/tests/strings sha1.phpt /php-src/ext/zlib/tests 005.phpt 006.phpt Log: MFB: change run-tests.php to add %a http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.329&r2=1.330&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.329 php-src/run-tests.php:1.330 --- php-src/run-tests.php:1.329 Tue Jul 31 21:29:11 2007 +++ php-src/run-tests.php Fri Sep 14 15:36:29 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.329 2007/07/31 21:29:11 jani Exp $ */ +/* $Id: run-tests.php,v 1.330 2007/09/14 15:36:29 nlopess Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -407,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.329 $'."\n"; + echo '$Revision: 1.330 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1550,14 +1550,15 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); // Stick to basics - $wanted_re = str_replace("%e", '\\' . DIRECTORY_SEPARATOR, $wanted_re); - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%w", "\s*", $wanted_re); - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); + $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); + $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); + $wanted_re = str_replace('%a', '.+', $wanted_re); + $wanted_re = str_replace('%w', '\s*', $wanted_re); + $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); + $wanted_re = str_replace('%d', '\d+', $wanted_re); + $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E-?\d+)?', $wanted_re); + $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } /* DEBUG YOUR REGEX HERE http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/tests/005.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/bz2/tests/005.phpt diff -u php-src/ext/bz2/tests/005.phpt:1.4 php-src/ext/bz2/tests/005.phpt:1.5 --- php-src/ext/bz2/tests/005.phpt:1.4 Sat Oct 7 23:42:43 2006 +++ php-src/ext/bz2/tests/005.phpt Fri Sep 14 15:36:29 2007 @@ -38,10 +38,10 @@ echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: bzcompress() expects at least 1 parameter, 0 given in %s on line %d NULL -string(%d) "BZ%s" +string(%d) "BZ%a" int(-2) int(-2) int(-2) @@ -73,7 +73,7 @@ --UEXPECTF-- Warning: bzcompress() expects at least 1 parameter, 0 given in %s on line %d NULL -unicode(%d) "BZ%s" +unicode(%d) "BZ%a" int(-2) int(-2) int(-2) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpcredits.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/general_functions/phpcredits.phpt diff -u php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.3 php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.4 --- php-src/ext/standard/tests/general_functions/phpcredits.phpt:1.3Wed Feb 14 19:20:15 2007 +++ php-src/ext/standard/tests/general_functions/phpcredits.phptFri Sep 14 15:36:29 2007 @@ -17,28 +17,28 @@ PHP Credits PHP Group -%s +%a Language Design & Concept -%s +%a %wPHP Authors%w -%s +%a %wSAPI Modules%w -%s +%a %wModule Authors%w -%s +%a %wPHP Documentation%w -%s +%a PHP Quality Assurance Team -%s +%a PHP Website Team -%s +%a bool(true) Warning: phpcredits() expects param
[PHP-CVS] cvs: php-src / run-tests.php
janiTue Jul 31 21:29:11 2007 UTC Modified files: /php-srcrun-tests.php Log: - Allow using * in test filenames to match pattern http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.328&r2=1.329&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.328 php-src/run-tests.php:1.329 --- php-src/run-tests.php:1.328 Wed Jul 4 10:15:47 2007 +++ php-src/run-tests.php Tue Jul 31 21:29:11 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.328 2007/07/04 10:15:47 dmitry Exp $ */ +/* $Id: run-tests.php,v 1.329 2007/07/31 21:29:11 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -407,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.328 $'."\n"; + echo '$Revision: 1.329 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -481,7 +481,18 @@ } if (!$is_switch) { $testfile = realpath($argv[$i]); - if (is_dir($testfile)) { + if (!$testfile && strpos($argv[$i], '*') !== false && function_exists('glob')) { + if (preg_match("/\.phpt$/", $argv[$i])) { + $pattern_match = glob($argv[$i]); + } else if (preg_match("/\*$/", $argv[$i])) { + $pattern_match = glob($argv[$i] . '.phpt'); + } else { + die("bogus test name " . $argv[$i] . "\n"); + } + if (is_array($pattern_match)) { + $test_files = array_merge($test_files, $pattern_match); + } + } else if (is_dir($testfile)) { find_files($testfile); } else if (preg_match("/\.phpt$/", $testfile)) { $test_files[] = $testfile; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
dmitry Fri Jun 29 09:49:40 2007 UTC Modified files: /php-srcrun-tests.php Log: Fixed CGI tests http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.326&r2=1.327&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.326 php-src/run-tests.php:1.327 --- php-src/run-tests.php:1.326 Tue Jun 5 11:33:09 2007 +++ php-src/run-tests.php Fri Jun 29 09:49:40 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.326 2007/06/05 11:33:09 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.327 2007/06/29 09:49:40 dmitry Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -407,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.326 $'."\n"; + echo '$Revision: 1.327 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1076,15 +1076,23 @@ /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { - if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { + if (isset($php_cgi)) { $old_php = $php; - $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; - } elseif (file_exists("./sapi/cgi/php-cgi")) { + $php = $php_cgi .' -C '; + } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { $old_php = $php; - $php = realpath("./sapi/cgi/php-cgi") . ' -C '; + $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; } else { - show_result("SKIP", $tested, $tested_file, $unicode_semantics, "reason: CGI not available"); - return 'SKIPPED'; + if (file_exists(dirname($php)."/../../sapi/cgi/php-cgi")) { + $old_php = $php; + $php = realpath(dirname($php)."/../../sapi/cgi/php-cgi") . ' -C '; + } else if (file_exists("./sapi/cgi/php-cgi")) { + $old_php = $php; + $php = realpath("./sapi/cgi/php-cgi") . ' -C '; + } else { + show_result("SKIP", $tested, $tested_file, "reason: CGI not available"); + return 'SKIPPED'; + } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Tue Jun 5 11:33:09 2007 UTC Modified files: /php-srcrun-tests.php Log: enable display_startup_errors http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.325&r2=1.326&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.325 php-src/run-tests.php:1.326 --- php-src/run-tests.php:1.325 Mon May 28 23:52:13 2007 +++ php-src/run-tests.php Tue Jun 5 11:33:09 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.325 2007/05/28 23:52:13 iliaa Exp $ */ +/* $Id: run-tests.php,v 1.326 2007/06/05 11:33:09 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -149,6 +149,7 @@ 'output_buffering=Off', 'error_reporting=8191', 'display_errors=1', + 'display_startup_errors=1', 'log_errors=0', 'html_errors=0', 'track_errors=1', @@ -406,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.325 $'."\n"; + echo '$Revision: 1.326 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php /ext/iconv iconv.c /ext/standard http_fopen_wrapper.c url_scanner.c /main php_content_types.c TSRM tsrm_virtual_cwd.c
iliaa Mon May 28 23:52:13 2007 UTC Modified files: /php-src/main php_content_types.c /php-src/ext/standard url_scanner.c http_fopen_wrapper.c /php-src/ext/iconv iconv.c /TSRM tsrm_virtual_cwd.c /php-srcrun-tests.php Log: MFB http://cvs.php.net/viewvc.cgi/php-src/main/php_content_types.c?r1=1.34&r2=1.35&diff_format=u Index: php-src/main/php_content_types.c diff -u php-src/main/php_content_types.c:1.34 php-src/main/php_content_types.c:1.35 --- php-src/main/php_content_types.c:1.34 Mon Jan 1 09:29:35 2007 +++ php-src/main/php_content_types.cMon May 28 23:52:13 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_content_types.c,v 1.34 2007/01/01 09:29:35 sebastian Exp $ */ +/* $Id: php_content_types.c,v 1.35 2007/05/28 23:52:13 iliaa Exp $ */ #include "php.h" #include "SAPI.h" @@ -37,21 +37,21 @@ */ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader) { - char *data = NULL; - int length = 0; + char *data; + int length; /* $HTTP_RAW_POST_DATA registration */ - if(!strcmp(SG(request_info).request_method, "POST")) { - if(NULL == SG(request_info).post_entry) { + if (!strcmp(SG(request_info).request_method, "POST")) { + if (NULL == SG(request_info).post_entry) { /* no post handler registered, so we just swallow the data */ sapi_read_standard_form_data(TSRMLS_C); + } + + /* For unknown content types we create HTTP_RAW_POST_DATA even if always_populate_raw_post_data off, +* this is in-effecient, but we need to keep doing it for BC reasons (for now) */ + if ((PG(always_populate_raw_post_data) || NULL == SG(request_info).post_entry) && SG(request_info).post_data) { length = SG(request_info).post_data_length; data = estrndup(SG(request_info).post_data, length); - } else if(PG(always_populate_raw_post_data) && SG(request_info).post_data) { - length = SG(request_info).post_data_length; - data = estrndup(SG(request_info).post_data, length); - } - if(data) { SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length); } } @@ -62,11 +62,10 @@ in the long run post handlers should be changed to not touch request_info.post_data for memory preservation reasons */ - if(SG(request_info).post_data) { + if (SG(request_info).post_data) { SG(request_info).raw_post_data = estrndup(SG(request_info).post_data, SG(request_info).post_data_length); SG(request_info).raw_post_data_length = SG(request_info).post_data_length; } - } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner.c?r1=1.46&r2=1.47&diff_format=u Index: php-src/ext/standard/url_scanner.c diff -u php-src/ext/standard/url_scanner.c:1.46 php-src/ext/standard/url_scanner.c:1.47 --- php-src/ext/standard/url_scanner.c:1.46 Mon Jan 1 09:29:32 2007 +++ php-src/ext/standard/url_scanner.c Mon May 28 23:52:13 2007 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]>| +--+ */ -/* $Id: url_scanner.c,v 1.46 2007/01/01 09:29:32 sebastian Exp $ */ +/* $Id: url_scanner.c,v 1.47 2007/05/28 23:52:13 iliaa Exp $ */ #include "php.h" @@ -50,35 +50,24 @@ static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf) { int flag = 0; - TSRMLS_FETCH(); - if(!strcasecmp(tag,"a") && !strcasecmp(attr,"href")) { + if (!strcasecmp(tag,"a") && !strcasecmp(attr,"href")) { flag = 1; - } else if(!strcasecmp(tag,"area" ) && !strcasecmp(attr,"href" )) { + } else if (!strcasecmp(tag,"area" ) && !strcasecmp(attr,"href" )) { flag = 1; - } else if(!strcasecmp(tag,"form" ) && !strcasecmp(attr,"action" )) { + } else if (!strcasecmp(tag,"form" ) && !strcasecmp(attr,"action" )) { flag = 1; - } else if(!strcasecmp(tag,"frame") && !strcasecmp(attr,"source" )) { + } else if (!strcasecmp(tag,"frame") && !strcasecmp(attr,"source" )) { flag = 1; - } else if(!strcasecmp(tag,"img" ) && !strcasecmp(attr,"action" )) { + } else if (!strcasecmp(tag,"img" ) && !strcasecmp(attr,"action" )) { flag = 1; } - if(flag) { - if(!strstr(val,buf)&&!strchr(val,':')) - { - char *result = (char *)emalloc(strlen(buf)+strlen(PG(arg_separator).output)+1); - int n; - -
[PHP-CVS] cvs: php-src / run-tests.php /sapi/cgi/tests include.inc
tony2001Sun May 27 19:22:24 2007 UTC Modified files: /php-srcrun-tests.php /php-src/sapi/cgi/tests include.inc Log: "sapi/cgi/php" -> "sapi/cgi/php-cgi" http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.323&r2=1.324&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.323 php-src/run-tests.php:1.324 --- php-src/run-tests.php:1.323 Sun May 20 18:29:43 2007 +++ php-src/run-tests.php Sun May 27 19:22:24 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.323 2007/05/20 18:29:43 helly Exp $ */ +/* $Id: run-tests.php,v 1.324 2007/05/27 19:22:24 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -105,7 +105,7 @@ if (getenv('TEST_PHP_CGI_EXECUTABLE')) { $php_cgi = getenv('TEST_PHP_CGI_EXECUTABLE'); if ($php_cgi=='auto') { - $php_cgi = $cwd.'/sapi/cgi/php'; + $php_cgi = $cwd.'/sapi/cgi/php-cgi'; putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi"); } $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi; @@ -406,7 +406,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.323 $'."\n"; + echo '$Revision: 1.324 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1078,9 +1078,9 @@ if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { $old_php = $php; $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; - } elseif (file_exists("./sapi/cgi/php")) { + } elseif (file_exists("./sapi/cgi/php-cgi")) { $old_php = $php; - $php = realpath("./sapi/cgi/php") . ' -C '; + $php = realpath("./sapi/cgi/php-cgi") . ' -C '; } else { show_result("SKIP", $tested, $tested_file, $unicode_semantics, "reason: CGI not available"); return 'SKIPPED'; http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/include.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/sapi/cgi/tests/include.inc diff -u php-src/sapi/cgi/tests/include.inc:1.1 php-src/sapi/cgi/tests/include.inc:1.2 --- php-src/sapi/cgi/tests/include.inc:1.1 Tue Apr 17 19:48:22 2007 +++ php-src/sapi/cgi/tests/include.inc Sun May 27 19:22:24 2007 @@ -30,9 +30,9 @@ } } - if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php") && is_executable($php_path."/cgi/php")) { + if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) { /* gotcha */ - return $php_path."/cgi/php"; + return $php_path."/cgi/php-cgi"; } return false; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Sun May 20 18:29:43 2007 UTC Modified files: /php-srcrun-tests.php Log: - Update copyright http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.322&r2=1.323&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.322 php-src/run-tests.php:1.323 --- php-src/run-tests.php:1.322 Sun May 20 18:24:15 2007 +++ php-src/run-tests.php Sun May 20 18:29:43 2007 @@ -4,7 +4,7 @@ +--+ | PHP Version 5| +--+ - | Copyright (c) 1997-2006 The PHP Group| + | Copyright (c) 1997-2007 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.322 2007/05/20 18:24:15 helly Exp $ */ +/* $Id: run-tests.php,v 1.323 2007/05/20 18:29:43 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -406,7 +406,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.322 $'."\n"; + echo '$Revision: 1.323 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Sun May 20 18:24:16 2007 UTC Modified files: /php-srcrun-tests.php Log: - Make it executeable http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.321&r2=1.322&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.321 php-src/run-tests.php:1.322 --- php-src/run-tests.php:1.321 Wed May 2 15:25:32 2007 +++ php-src/run-tests.php Sun May 20 18:24:15 2007 @@ -1,3 +1,4 @@ +#!/usr/bin/php http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Wed May 2 15:25:32 2007 UTC Modified files: /php-srcrun-tests.php Log: make USE_ZEND_ALLOC env var available in SKIPIF section http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.320&r2=1.321&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.320 php-src/run-tests.php:1.321 --- php-src/run-tests.php:1.320 Mon Apr 23 20:55:56 2007 +++ php-src/run-tests.php Wed May 2 15:25:32 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.320 2007/04/23 20:55:56 johannes Exp $ */ +/* $Id: run-tests.php,v 1.321 2007/05/02 15:25:32 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -405,7 +405,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.320 $'."\n"; + echo '$Revision: 1.321 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1215,6 +1215,12 @@ $ini_settings .= " -dunicode.semantics=" . (int)$unicode_test; + if ($leak_check) { + $env['USE_ZEND_ALLOC'] = '0'; + } else { + $env['USE_ZEND_ALLOC'] = '1'; + } + $output = system_with_timeout("$extra $php -q $ini_settings $test_skipif", $env); if (!$cfg['keep']['skip']) { @unlink($test_skipif); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
johannesMon Apr 23 20:55:56 2007 UTC Modified files: /php-srcrun-tests.php Log: - Keep unicode.semantcis for SKIPIF http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.319&r2=1.320&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.319 php-src/run-tests.php:1.320 --- php-src/run-tests.php:1.319 Mon Apr 23 11:19:05 2007 +++ php-src/run-tests.php Mon Apr 23 20:55:56 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.319 2007/04/23 11:19:05 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.320 2007/04/23 20:55:56 johannes Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -405,7 +405,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.319 $'."\n"; + echo '$Revision: 1.320 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1212,6 +1212,9 @@ save_text($test_skipif, $section_text['SKIPIF'], $temp_skipif); $extra = substr(PHP_OS, 0, 3) !== "WIN" ? "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": ""; + + $ini_settings .= " -dunicode.semantics=" . (int)$unicode_test; + $output = system_with_timeout("$extra $php -q $ini_settings $test_skipif", $env); if (!$cfg['keep']['skip']) { @unlink($test_skipif); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Mon Apr 23 11:19:05 2007 UTC Modified files: /php-srcrun-tests.php Log: there are definitely no problems found if all tests passed http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.318&r2=1.319&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.318 php-src/run-tests.php:1.319 --- php-src/run-tests.php:1.318 Tue Apr 17 19:48:22 2007 +++ php-src/run-tests.php Mon Apr 23 11:19:05 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.318 2007/04/17 19:48:22 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.319 2007/04/23 11:19:05 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -405,7 +405,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.318 $'."\n"; + echo '$Revision: 1.319 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -656,7 +656,10 @@ /* We got failed Tests, offer the user to send an e-mail to QA team, unless NO_INTERACTION is set */ if (!getenv('NO_INTERACTION')) { $fp = fopen("php://stdin", "r+"); - echo "\nYou may have found a problem in PHP.\nWe would like to send this report automatically to the\n"; + if ($sum_results['FAILED'] || $sum_results['BORKED'] || $sum_results['WARNED'] || $sum_results['LEAKED']) { + echo "\nYou may have found a problem in PHP."; + } + echo "\nWe would like to send this report automatically to the\n"; echo "PHP QA team, to give us a better understanding of how\nthe test cases are doing. If you don't want to send it\n"; echo "immediately, you can choose \"s\" to save the report to\na file that you can send us later.\n"; echo "Do you want to send this report now? [Yns]: "; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php /sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt include.inc skipif.inc
tony2001Tue Apr 17 19:48:22 2007 UTC Added files: /php-src/sapi/cgi/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 006.phpt 007.phpt 008.phpt include.inc skipif.inc Modified files: /php-srcrun-tests.php Log: add tests for CGI http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.317&r2=1.318&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.317 php-src/run-tests.php:1.318 --- php-src/run-tests.php:1.317 Thu Apr 12 13:17:14 2007 +++ php-src/run-tests.php Tue Apr 17 19:48:22 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.317 2007/04/12 13:17:14 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.318 2007/04/17 19:48:22 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -405,7 +405,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.317 $'."\n"; + echo '$Revision: 1.318 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -542,7 +542,7 @@ $ignored_by_ext = 0; sort($exts_to_test); $test_dirs = array(); -$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli'); +$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi'); foreach($optionals as $dir) { if (@filetype($dir) == 'dir') { $test_dirs[] = $dir; http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/001.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/001.phpt +++ php-src/sapi/cgi/tests/001.phpt --TEST-- version string --SKIPIF-- --FILE-- --EXPECTF-- string(%d) "PHP %s (cgi%s (built: %s Copyright (c) 1997-20%s The PHP Group Zend Engine v%s, Copyright (c) 1998-20%s Zend Technologies " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/002.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/002.phpt +++ php-src/sapi/cgi/tests/002.phpt --TEST-- defining INI options with -d --SKIPIF-- --FILE-- '); var_dump(`$php -n -d max_execution_time=111 $file`); var_dump(`$php -n -d max_execution_time=500 $file`); var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`); file_put_contents($file, ''); var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 $file`); unlink($file); echo "Done\n"; ?> --EXPECTF-- string(%d) "X-Powered-By: PHP/%s Content-type: text/html string(3) "111" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html string(3) "500" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html string(3) "555" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html string(3) "555" string(10) "/test/path" " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/003.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/003.phpt +++ php-src/sapi/cgi/tests/003.phpt --TEST-- strip comments and whitespace with -w --SKIPIF-- --FILE-- '; file_put_contents($filename, $code); var_dump(`$php -n -w "$filename"`); var_dump(`$php -n -w "wrong"`); var_dump(`echo "" | $php -n -w`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(%d) "X-Powered-By: PHP/%s Content-type: text/html " string(%d) "Status: 404 X-Powered-By: PHP/%s Content-type: text/html No input file specified. " string(%d) "X-Powered-By: PHP/%s Content-type: text/html " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/004.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/004.phpt +++ php-src/sapi/cgi/tests/004.phpt --TEST-- execute a file with -f --SKIPIF-- --FILE-- '; file_put_contents($filename, $code); var_dump(`$php -n -f "$filename" 2>/dev/null`); var_dump(`$php -n -f "wrong"`); @unlink($filename); echo "Done\n"; ?> --EXPECTF-- string(%d) " Fatal error: Cannot access private property test::$pri in %s004.test.php on line 8 " string(25) "No input file specified. " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/005.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/005.phpt +++ php-src/sapi/cgi/tests/005.phpt --TEST-- using invalid combinations of cmdline options --SKIPIF-- --FILE-- --EXPECTF-- string(55) "You cannot use both -n and -c switch. Use -h for help. " string(51) "No input file specified. Interactive mode enabled " string(51) "No input file specified. Interactive mode enabled " Done http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/tests/006.phpt?view=markup&rev=1.1 Index: php-src/sapi/cgi/tests/006.phpt +++ php-src/sapi/cgi/tests/
[PHP-CVS] cvs: php-src / run-tests.php
tony2001Thu Apr 12 13:17:15 2007 UTC Modified files: /php-srcrun-tests.php Log: bail out if unicode.semantics is On (stream_select() is unable to cast Unicode streams to FDs) check stream_select() return value correctly and avoid endless loop http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.316&r2=1.317&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.316 php-src/run-tests.php:1.317 --- php-src/run-tests.php:1.316 Tue Mar 27 20:27:39 2007 +++ php-src/run-tests.php Thu Apr 12 13:17:14 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.316 2007/03/27 20:27:39 helly Exp $ */ +/* $Id: run-tests.php,v 1.317 2007/04/12 13:17:14 tony2001 Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -82,6 +82,10 @@ error_reporting(E_ALL); ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections +if (ini_get("unicode.semantics")) { + error("It is currently not possible to use run-tests.php with unicode.semantics=On. Please turn it Off and re-run the tests."); +} + $environment = isset($_ENV) ? $_ENV : array(); // Don't ever guess at the PHP executable location. @@ -401,7 +405,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.316 $'."\n"; + echo '$Revision: 1.317 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -869,7 +873,9 @@ $e = null; $n = @stream_select($r, $w, $e, $leak_check ? 300 : 60); - if ($n === 0) { + if ($n === false) { + break; + } else if ($n === 0) { /* timed out */ $data .= "\n ** ERROR: process timed out **\n"; proc_terminate($proc); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
helly Tue Mar 27 20:27:39 2007 UTC Modified files: /php-srcrun-tests.php Log: - Allow to load multipe extensions via -d http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.315&r2=1.316&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.315 php-src/run-tests.php:1.316 --- php-src/run-tests.php:1.315 Thu Feb 8 15:25:17 2007 +++ php-src/run-tests.php Tue Mar 27 20:27:39 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.315 2007/02/08 15:25:17 nlopess Exp $ */ +/* $Id: run-tests.php,v 1.316 2007/03/27 20:27:39 helly Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -401,7 +401,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.315 $'."\n"; + echo '$Revision: 1.316 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1748,7 +1748,14 @@ $setting = explode("=", $setting, 2); $name = trim(strtolower($setting[0])); $value = trim($setting[1]); - $ini_settings[$name] = $value; + if ($name == 'extension') { + if (!isset($ini_settings[$name])) { + $ini_settings[$name] = array(); + } + $ini_settings[$name][] = $value; + } else { + $ini_settings[$name] = $value; + } } } } @@ -1757,8 +1764,15 @@ { $settings = ''; foreach($ini_settings as $name => $value) { - $value = addslashes($value); - $settings .= " -d \"$name=$value\""; + if (is_array($value)) { + foreach($value as $val) { + $val = addslashes($val); + $settings .= " -d \"$name=$val\""; + } + } else { + $value = addslashes($value); + $settings .= " -d \"$name=$value\""; + } } $ini_settings = $settings; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
nlopess Thu Feb 8 15:25:17 2007 UTC Modified files: /php-srcrun-tests.php Log: MFB: remove ereg() calls http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.314&r2=1.315&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.314 php-src/run-tests.php:1.315 --- php-src/run-tests.php:1.314 Tue Jan 30 17:41:11 2007 +++ php-src/run-tests.php Thu Feb 8 15:25:17 2007 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.314 2007/01/30 17:41:11 nlopess Exp $ */ +/* $Id: run-tests.php,v 1.315 2007/02/08 15:25:17 nlopess Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -401,7 +401,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.314 $'."\n"; + echo '$Revision: 1.315 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -522,7 +522,7 @@ if ($html_output) { fclose($html_file); } - if (getenv('REPORT_EXIT_STATUS') == 1 and ereg('FAILED( |$)', implode(' ', $test_results))) { + if (getenv('REPORT_EXIT_STATUS') == 1 and preg_match('/FAILED(?: |$)/', implode(' ', $test_results))) { exit(1); } exit(0); @@ -986,7 +986,7 @@ $bork_info = "empty test [$file]"; $borked = true; } - if (!ereg('^--TEST--',$line,$r)) { + if (strncmp('--TEST--', $line, 8)) { $bork_info = "tests must start with --TEST-- [$file]"; $borked = true; } @@ -1011,7 +1011,7 @@ } // End of actual test? - if ($secfile && preg_match('/^===DONE===/', $line, $r)) { + if ($secfile && preg_match('/^===DONE===$/', $line)) { $secdone = true; } } @@ -1207,10 +1207,9 @@ if (!$cfg['keep']['skip']) { @unlink($test_skipif); } - if (!strncasecmp('skip', trim($output), 4)) { - $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - show_result("SKIP", $tested, $tested_file, $unicode_semantics, "reason: $reason", $temp_filenames); + if (!strncasecmp('skip', ltrim($output), 4)) { + if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $m)) { + show_result("SKIP", $tested, $tested_file, $unicode_semantics, "reason: $m[1]", $temp_filenames); } else { show_result("SKIP", $tested, $tested_file, $unicode_semantics, '', $temp_filenames); } @@ -1222,17 +1221,15 @@ } return 'SKIPPED'; } - if (!strncasecmp('info', trim($output), 4)) { - $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $info = " (info: $reason)"; + if (!strncasecmp('info', ltrim($output), 4)) { + if (preg_match('/^\s*info\s*(.+)\s*/i', $output, $m)) { + $info = " (info: $m[1])"; } } - if (!strncasecmp('warn', trim($output), 4)) { - $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { + if (!strncasecmp('warn', ltrim($output), 4)) { + if (preg_match('/^\s*warn\s*(.+)\s*/i', $output, $m)) { $warn = true; /* only if there is a reason */ - $info = " (warn: $reason)"; + $info = " (warn: $m[1])"; } } } @@ -1357,8