Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.5

Request #3717 [Patch] Implement Simple run-tests output
Submitted: 2005-03-06 05:56 UTC
From: davey Assigned: cellog
Status: Closed Package: PEAR
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-06 05:56 UTC] davey
Description: ------------ Here is a simple patch to add a simple output to pear run-tests. This is needed because on my system my file tree is deep I can't see skip reasons on the end of the lines and they're really unnecessary for me anyways. It works using a --simple or -s flag. This should be on current CVS HEAD: Index: RunTest.php =================================================================== RCS file: /repository/pear-core/PEAR/RunTest.php,v retrieving revision 1.11 diff -u -r1.11 RunTest.php --- RunTest.php 21 Feb 2005 19:59:01 -0000 1.11 +++ RunTest.php 6 Mar 2005 05:55:14 -0000 @@ -105,7 +105,11 @@ fclose($fp); $shortname = str_replace($cwd.'/', '', $file); - $tested = trim($section_text['TEST'])." [$shortname]"; + if (!isset($this->_options['simple'])) { + $tested = trim($section_text['TEST'])." [$shortname]"; + } else { + $tested = trim($section_text['TEST'])." "; + } $tmp = realpath(dirname($file)); $tmp_skipif = $tmp . uniqid('/phpt.'); Index: Command/Package.php =================================================================== RCS file: /repository/pear-core/PEAR/Command/Package.php,v retrieving revision 1.95 diff -u -r1.95 Package.php --- Command/Package.php 21 Feb 2005 17:38:58 -0000 1.95 +++ Command/Package.php 6 Mar 2005 05:55:15 -0000 @@ -185,6 +185,10 @@ 'shortopt' => 'q', 'doc' => 'Only display detail for failed tests', ), + 'simple' => array( + 'shortopt' => 's', + 'doc' => 'Display simple output for all tests', + ), ), 'doc' => '[testfile|dir ...] Run regression tests with PHP\'s regression testing script (run-tests.php).', Reproduce code: --------------- pear run-tests Expected result: ---------------- C:\web\cerebralcortex\packages>pear run-tests -r -s Running 22 tests PASS [Crtx_XML_WSDL] Correctly generate PHP Skeleton code from WSDL PASS [Crtx_XML_WSDL] Correctly Parse a complex WSDL file PASS [Crtx_XML_WSDL] Correctly create WSDL for PHPs str_replace function PASS [Crtx_Template] Parse a simple template correctly PASS [Crtx_Template] Set Custom Module Directory PASS [Crtx_Template] Include a template correctly. PASS [Crtx_Template] Text_Wiki Module parses/renders correctly FAIL [Crtx_Template] Text_XML_RSS Module parsers/renders correctly PASS [Crtx_Template] Variables Module get/sets correctly (<crtx:var>) PASS [Crtx_Template] Variables Module get/sets correctly (<crtx:variable>) PASS [Crtx_Template] Include nested templates correctly. PASS [Crtx_Exception] Make sure messages/error codes are set properly PASS [Crtx_DB_DataObject] Add new Record PASS [Crtx_DB_DataObject] Add record with a relationship PASS [Crtx_Config] Correctly get and set values (same config instance) PASS [Crtx_Config] Correctly get and set values (different config instances) PASS [Crtx_Config] Read and write an array PASS [Crtx_Config] Read and write Decimal Numbers PASS [Crtx_Config] Read and write Hex/Octal Numbers PASS [Crtx_Config] Read and write an object PASS [Crtx_Config] Overwrite values PASS [Crtx_Config] Read and Write strings wrote log to "C:\web\cerebralcortex\packages\run-tests.log" TOTAL TIME: 00:22 21 PASSED TESTS 0 SKIPPED TESTS 1 FAILED TESTS: C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Text_XML_RSS.phpt Actual result: -------------- C:\web\cerebralcortex\packages>pear run-tests -r Running 22 tests PASS [Crtx_XML_WSDL] Correctly generate PHP Skeleton code from WSDL [C:\web\cerebralcortex\packages\Crtx_XML_WSDL\tests\Code_Generator.phpt] PASS [Crtx_XML_WSDL] Correctly Parse a complex WSDL file [C:\web\cerebralcortex\packages\Crtx_XML_WSDL\tests\Parser_Complex.phpt] PASS [Crtx_XML_WSDL] Correctly create WSDL for PHPs str_replace function [C:\web\cerebralcortex\packages\Crtx_XML_WSDL\tests\Str_Replace_WSDL.phpt] PASS [Crtx_Template] Parse a simple template correctly [C:\web\cerebralcortex\packages\Crtx_Template\tests\Basic_Template.phpt] PASS [Crtx_Template] Set Custom Module Directory [C:\web\cerebralcortex\packages\Crtx_Template\tests\Custom_Module_Dir.phpt] PASS [Crtx_Template] Include a template correctly. [C:\web\cerebralcortex\packages\Crtx_Template\tests\Include_Template.phpt] PASS [Crtx_Template] Text_Wiki Module parses/renders correctly [C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Text_Wiki.phpt] FAIL [Crtx_Template] Text_XML_RSS Module parsers/renders correctly [C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Text_XML_RSS.phpt] PASS [Crtx_Template] Variables Module get/sets correctly (<crtx:var>) [C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Variables.phpt] PASS [Crtx_Template] Variables Module get/sets correctly (<crtx:variable>) [C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Variables_2.phpt] PASS [Crtx_Template] Include nested templates correctly. [C:\web\cerebralcortex\packages\Crtx_Template\tests\Nested_Include_Template.phpt] PASS [Crtx_Exception] Make sure messages/error codes are set properly [C:\web\cerebralcortex\packages\Crtx_Exception\tests\Throw_Exception.phpt] PASS [Crtx_DB_DataObject] Add new Record [C:\web\cerebralcortex\packages\Crtx_DB\tests\Crtx_DB_DataObject\Add_Record.phpt] PASS [Crtx_DB_DataObject] Add record with a relationship [C:\web\cerebralcortex\packages\Crtx_DB\tests\Crtx_DB_DataObject\Add_With_Relationship.phpt] PASS [Crtx_Config] Correctly get and set values (same config instance) [C:\web\cerebralcortex\packages\Crtx_Config\tests\Get_Set.phpt] PASS [Crtx_Config] Correctly get and set values (different config instances) [C:\web\cerebralcortex\packages\Crtx_Config\tests\Get_Set_2.phpt] PASS [Crtx_Config] Read and write an array [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_Array.phpt] PASS [Crtx_Config] Read and write Decimal Numbers [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_Decimal.phpt] PASS [Crtx_Config] Read and write Hex/Octal Numbers [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_Hex_Octal.phpt] PASS [Crtx_Config] Read and write an object [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_Object.phpt] PASS [Crtx_Config] Overwrite values [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_Overwrite.phpt] PASS [Crtx_Config] Read and Write strings [C:\web\cerebralcortex\packages\Crtx_Config\tests\Read_Write_String.phpt] wrote log to "C:\web\cerebralcortex\packages\run-tests.log" TOTAL TIME: 00:23 21 PASSED TESTS 0 SKIPPED TESTS 1 FAILED TESTS: C:\web\cerebralcortex\packages\Crtx_Template\tests\Module_Text_XML_RSS.phpt

Comments

 [2005-03-17 02:06 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.