g2 Thu, 20 Aug 2009 21:08:45 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287516
Log: update phpruntests - added php-command to verbose-output Changed paths: U php/phpruntests/trunk/src/testcase/rtPhpTest.php U php/phpruntests/trunk/src/testcase/rtTestOutputWriter.php U php/phpruntests/trunk/src/testcase/rtTestStatus.php U php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php U php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php U php/phpruntests/trunk/src/testcase/sections/rtExecutableSection.php Modified: php/phpruntests/trunk/src/testcase/rtPhpTest.php =================================================================== --- php/phpruntests/trunk/src/testcase/rtPhpTest.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/rtPhpTest.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -104,10 +104,13 @@ if (array_key_exists('SKIPIF', $this->sections)) { $this->testStatus = $this->sections['SKIPIF']->run($this, $runConfiguration); + $this->testStatus->setExecutedPhpCommand($this->sections['SKIPIF']->getPhpCommand()); } if (!$this->testStatus->getValue('skip') && !$this->testStatus->getValue('skip')) { $this->testStatus = $this->fileSection->run($this, $runConfiguration); + $this->testStatus->setExecutedPhpCommand($this->fileSection->getPhpCommand()); + //The test can be skipped by file sections if the CGI executable is not available if(!$this->testStatus->getValue('skip')) { $this->output = $this->fileSection->getOutput(); Modified: php/phpruntests/trunk/src/testcase/rtTestOutputWriter.php =================================================================== --- php/phpruntests/trunk/src/testcase/rtTestOutputWriter.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/rtTestOutputWriter.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -277,6 +277,11 @@ print "$t:\t$file\n"; } } + + $cmd = $s->getExecutedPhpCommand(); + if (!is_null($cmd)) { + print "PHP-COMMAND: $cmd\n"; + } } break; } Modified: php/phpruntests/trunk/src/testcase/rtTestStatus.php =================================================================== --- php/phpruntests/trunk/src/testcase/rtTestStatus.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/rtTestStatus.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -17,6 +17,7 @@ protected $testName; protected $states = array(); protected $messages = array(); + protected $executedPhpCommand; protected $testStateNames = array ('skip', 'bork', 'warn', @@ -73,6 +74,16 @@ { return $this->testName; } + + public function setExecutedPhpCommand($cmd) + { + $this->executedPhpCommand = $cmd; + } + + public function getExecutedPhpCommand() + { + return $this->executedPhpCommand; + } public function __toString() { Modified: php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php =================================================================== --- php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -52,6 +52,7 @@ $phpCommand .= ' '.$testCase->testConfiguration->getTestCommandLineArguments(); $phpCommand .= ' 2>&1 '.$testCase->testConfiguration->getInputFileString(); + $this->phpCommand = $phpCommand; $PhpRunner = new rtPhpRunner($phpCommand, $testCase->testConfiguration->getEnvironmentVariables(), @@ -100,14 +101,17 @@ } - public function deleteMemFile() { + public function deleteMemFile() + { @unlink($this->memFileName); } - public function getMemFileName() { + public function getMemFileName() + { return $this->memFileName; } + } ?> Modified: php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php =================================================================== --- php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -39,6 +39,8 @@ $phpCommand .= ' '.$testCase->testConfiguration->getPhpCommandLineArguments(); $phpCommand .= ' -f '.$this->fileName; + $this->phpCommand = $phpCommand; + $PhpRunner = new rtPhpRunner($phpCommand, $runConfiguration->getEnvironmentVariables(), $runConfiguration->getSetting('WorkingDirectory') Modified: php/phpruntests/trunk/src/testcase/sections/rtExecutableSection.php =================================================================== --- php/phpruntests/trunk/src/testcase/sections/rtExecutableSection.php 2009-08-20 20:59:24 UTC (rev 287515) +++ php/phpruntests/trunk/src/testcase/sections/rtExecutableSection.php 2009-08-20 21:08:45 UTC (rev 287516) @@ -18,6 +18,7 @@ protected $fileName; protected $output; protected $status; + protected $phpCommand = null; protected function init() { @@ -46,6 +47,11 @@ return $this->output; } + public function getPhpCommand() + { + return $this->phpCommand; + } + abstract function run(rtPhpTest $testcase, rtRuntestsConfiguration $runConfiguration); } ?>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php