[limb-svn] r6060 - 3.x/trunk/limb/tests_runner/src
svn at limb-project.com
svn at limb-project.com
Tue Jul 3 15:51:31 MSD 2007
Author: pachanga
Date: 2007-07-03 15:51:30 +0400 (Tue, 03 Jul 2007)
New Revision: 6060
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6060
Modified:
3.x/trunk/limb/tests_runner/src/lmbTestRunner.class.php
3.x/trunk/limb/tests_runner/src/lmbTestShellUI.class.php
Log:
-- fixing TR-13, now it's possible to cover code without generating html report
-- new cmd line option added, -C it's an alias for --cover
-- if test path is omitted '.' is used
Modified: 3.x/trunk/limb/tests_runner/src/lmbTestRunner.class.php
===================================================================
--- 3.x/trunk/limb/tests_runner/src/lmbTestRunner.class.php 2007-07-03 11:38:15 UTC (rev 6059)
+++ 3.x/trunk/limb/tests_runner/src/lmbTestRunner.class.php 2007-07-03 11:51:30 UTC (rev 6060)
@@ -32,10 +32,10 @@
function useCoverage($coverage_include, $coverage_exclude, $coverage_report_dir)
{
if(is_string($coverage_include))
- $this->coverage_include = explode(';', $this->coverage_include);
+ $this->coverage_include = explode(';', $coverage_include);
if(is_string($coverage_exclude))
- $this->coverage_exclude = explode(';', $this->coverage_exclude);
+ $this->coverage_exclude = explode(';', $coverage_exclude);
$this->coverage_report_dir = $coverage_report_dir;
}
@@ -99,7 +99,8 @@
if($this->coverage)
{
$this->coverage->stopInstrumentation();
- $this->coverage->generateReport();
+ if($this->coverage_report_dir)
+ $this->coverage->generateReport();
$this->coverage_reporter->printTextSummary();
}
}
Modified: 3.x/trunk/limb/tests_runner/src/lmbTestShellUI.class.php
===================================================================
--- 3.x/trunk/limb/tests_runner/src/lmbTestShellUI.class.php 2007-07-03 11:38:15 UTC (rev 6059)
+++ 3.x/trunk/limb/tests_runner/src/lmbTestShellUI.class.php 2007-07-03 11:51:30 UTC (rev 6060)
@@ -62,7 +62,7 @@
Options:
-c, --config=/file.php PHP configuration file path
-h, --help Displays this help and exit
- --cover=path1;path2 Sets paths delimitered with ';' which should be analyzed for coverage
+ -C, --cover=path1;path2 Sets paths delimitered with ';' which should be analyzed for coverage
--cover-report=dir Sets coverage report directory
--cover-exclude=path1;path2 Sets paths delimitered with ';' which should be excluded from coverage analysis
@@ -100,7 +100,7 @@
static function getShortOpts()
{
- return 'hvt:b:c:';
+ return 'hvt:b:c:C:';
}
static function getLongOpts()
@@ -165,6 +165,7 @@
$this->_error("Could not include configuration file '{$option[1]}'\n");
$configured = true;
break;
+ case 'C':
case '--cover':
$cover_include = $option[1];
break;
@@ -180,8 +181,10 @@
if(!$configured && $config = getenv('LIMB_TESTS_RUNNER_CONFIG'))
include_once($config);
- if(!is_array($options[1]))
- $this->_help(1);
+ if(!is_array($options[1]) || !count($options[1]))
+ $paths = array('.');
+ else
+ $paths = $options[1];
if(!$cover_report_dir && defined('LIMB_TESTS_RUNNER_COVERAGE_REPORT_DIR'))
$cover_report_dir = LIMB_TESTS_RUNNER_COVERAGE_REPORT_DIR;
@@ -196,7 +199,7 @@
try
{
- $node = new lmbTestTreeGlobNode($options[1]);
+ $node = new lmbTestTreeGlobNode($paths);
$res = $runner->run($node);
}
//it's an exception which is used to pass user errors up to the interface,
More information about the limb-svn
mailing list