helly Sat Mar 11 16:37:53 2006 UTC Modified files: (Branch: PHP_5_1) /php-src run-tests.php Log: - Load list of extensions to test from php that is being tested rather than from php running the tests http://cvs.php.net/viewcvs.cgi/php-src/run-tests.php?r1=1.226.2.32&r2=1.226.2.33&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.32 php-src/run-tests.php:1.226.2.33 --- php-src/run-tests.php:1.226.2.32 Thu Feb 16 06:29:40 2006 +++ php-src/run-tests.php Sat Mar 11 16:37:53 2006 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: run-tests.php,v 1.226.2.32 2006/02/16 06:29:40 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.226.2.33 2006/03/11 16:37:53 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 @@ -142,6 +142,7 @@ $user_tests = array(); } +$exts_to_test = array(); $ini_overwrites = array( 'output_handler=', 'open_basedir=', @@ -166,7 +167,7 @@ function write_information($show_html) { - global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options; + global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test; // Get info from php $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php'; @@ -186,17 +187,17 @@ @unlink($info_file); define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`); + // load list of enabled extensions + save_text($info_file, '<?php echo join(",",get_loaded_extensions()); ?>'); + $exts_to_test = explode(',',`$php $pass_options $info_params $info_file`); // check for extensions that need special handling and regenerate - $php_extensions = '<?php echo join(",",get_loaded_extensions()); ?>'; - save_text($info_file, $php_extensions); - $php_extensions = explode(',',`$php $pass_options $info_params $info_file`); $info_params_ex = array( 'session' => array('session.auto_start=0'), '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, $php_extensions)) { + if (in_array($ext, $exts_to_test)) { $ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex); } } @@ -387,7 +388,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.32 $'."\n"; + echo '$Revision: 1.226.2.33 $'."\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -518,13 +519,12 @@ // Compile a list of all test files (*.phpt). $test_files = array(); -$exts_to_test = get_loaded_extensions(); $exts_tested = count($exts_to_test); $exts_skipped = 0; $ignored_by_ext = 0; sort($exts_to_test); -$test_dirs = array('tests', 'ext'); -$optionals = array('Zend', 'ZendEngine2'); +$test_dirs = array(); +$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2'); foreach($optionals as $dir) { if (@filetype($dir) == 'dir') { $test_dirs[] = $dir;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php