running test cases for PEAR core

From: Date: Mon, 01 Dec 2003 00:44:02 +0000
Subject: running test cases for PEAR core
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-249@lists.php.net to get a copy of this message
Hi all, I just wanted to let you know that there is a new and improved way to run the tests for the PEAR core. First of all, every single test had "skip" in the SKIPIF section until this week. This means those who thought they were runnig them actually weren't, as evidenced by the PEAR_Registry test, which was completely out of date for the past year or so. Basically, there are a few steps to run the regression tests for the core. 1) checkout php-src/ - the full checkout, so you can get runtests.php 2) take the following script and modify the path for TEST_PHP_EXECUTABLE and the include statement at the bottom of the file 3) either run from the command-line: $ php -q myruntests.php pear/tests or, open the page in your web browser as http://localhost/myruntests.php?testfile=pear/tests. 4) if you wish to run only a single test, specify the full path (pear/tests/pear_error1.phpt, for example) <?php putenv('TEST_PHP_EXECUTABLE=C:\\PHP4.3.3\\cli\\php.exe'); putenv('TEST_PHP_DETAILED=1'); chdir('C:/l/php-src'); if (isset($_SERVER['PHP_SELF'])) {
    echo '<pre>';
} if (isset($_GET['testfile'])) {
    $argv = array();
    $argv[1] = $_GET['testfile'];
    $argc = 2;
} putenv('PHP_PEAR_RUNTESTS=1'); include 'C:/l/php-src/run-tests.php'; ?> This should get QA up and running a bit better. I've added a hell of a lot of new regression tests, and they need to be run on other systems from mine to make sure things are working. If they don't work, a .diff file will be generated in the php-src/pear/tests directory, send it here. NOTE: the test for PEAR_Common::downloadHttp() requires an internet connection, and will skip if fsockopen() does not work on pear.php.net. Regards, Greg

« previous php.pear.qa (#249) next »