com phpruntests: Changes to add default test directories (running from make test): src/configuration/rtCommandLineOptions.php src/run-tests.php
src/testrun/rtPhpTestRun.php

From: Date: Tue, 09 Oct 2012 13:57:59 +0000
Subject: com phpruntests: Changes to add default test directories (running from make test): src/configuration/rtCommandLineOptions.php src/run-tests.php
src/testrun/rtPhpTestRun.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66749@lists.php.net to get a copy of this message
Commit: b3d8d59065990541c66cad5e84ba0d0c836684c2 Author: zoe slattery <zoe@php.net> Tue, 9 Oct 2012 14:57:59 +0100 Parents: 5bfcd27d56f557e23760435c4fd0ca83f6d077ba Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=b3d8d59065990541c66cad5e84ba0d0c836684c2 Log: Changes to add default test directories (running from make test) Changed paths: M src/configuration/rtCommandLineOptions.php M src/run-tests.php M src/testrun/rtPhpTestRun..php Diff: diff --git a/src/configuration/rtCommandLineOptions.php b/src/configuration/rtCommandLineOptions.php index 58188eb..eec5f39 100644 --- a/src/configuration/rtCommandLineOptions.php +++ b/src/configuration/rtCommandLineOptions.php @@ -158,6 +158,13 @@ class rtCommandLineOptions $i++; $this->options[$option] = $argv[$i]; } + + if(empty($this->testFilename)) { + //set default options if being run from PHP top level directory (as in make test) + if(file_exists(getcwd() . "/" . "sapi/cli/php")) { + $this->testFilename = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi'); + } + } } /** diff --git a/src/run-tests.php b/src/run-tests.php index 3d11d00..3adb55f 100644 --- a/src/run-tests.php +++ b/src/run-tests.php @@ -33,6 +33,7 @@ if (version_compare(PHP_VERSION, '5.3.0RC1', '<')) { require_once dirname(__FILE__) . '/rtAutoload.php'; $s = microtime(true); +var_dump($argv); $phpTestRun = new rtPhpTestRun($argv); $phpTestRun->run(); diff --git a/src/testrun/rtPhpTestRun.php b/src/testrun/rtPhpTestRun.php index d42094c..2850d33 100644 --- a/src/testrun/rtPhpTestRun.php +++ b/src/testrun/rtPhpTestRun.php @@ -314,6 +314,11 @@ class rtPhpTestRun } else if ($this->runConfiguration->hasCommandLineOption('vvv')) { $this->reportStatus = 3; } + + //Set the default for runs from 'make test' + if ( file_exists(getcwd() . "/sapi/cli/php")) { + $this->reportStatus = 1; + } } }

« previous php.qa (#66749) next »