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

Bug #11635 pear run-tests attempt to run *.diff, *.exp, etc.
Submitted: 2007-07-18 12:15 UTC Modified: 2007-08-16 15:45 UTC
From: jstump Assigned: dufuz
Status: Closed Package: PEAR (version 1.6.1)
PHP Version: Irrelevant OS: All
Roadmaps: 1.6.2    
Subscription  


 [2007-07-18 12:15 UTC] jstump (Joe Stump)
Description: ------------ When running `pear run-tests 037-stories-*` I get the following from a previous failed test: Invalid sections formats in test file: /home/jstump/repository/pear/trunk/Services_Digg/tests/037-stories-top.diff Invalid sections formats in test file: /home/jstump/repository/pear/trunk/Services_Digg/tests/037-stories-top.exp Invalid sections formats in test file: /home/jstump/repository/pear/trunk/Services_Digg/tests/037-stories-top.log Invalid sections formats in test file: /home/jstump/repository/pear/trunk/Services_Digg/tests/037-stories-top.out Invalid sections formats in test file: /home/jstump/repository/pear/trunk/Services_Digg/tests/037-stories-top.php Test script: --------------- Just run a failed test and then attempt to run again. Either cleanup isn't happening or it's blindly testing all files (I think the proper behavior would be to only test *.phpt files).

Comments

 [2007-07-18 13:01 UTC] jstump (Joe Stump)
I found a fix (not sure if it's "proper", but it works). In PEAR/Command/Test.php around line 205 (after it finds all the tests you're trying to run) I added this: $cleaned = array(); foreach ($tests as $t) { if (!preg_match('/\.phpt$/', $t)) { continue; } $cleaned[] = $t; } $tests = $cleaned;
 [2007-08-16 15:34 UTC] dufuz (Helgi ├×ormar)
Well the checking atm is pretty relaxed and well bash like, since you ask for -* then you get -* not -*.phpt :) But well I agree with you, I'll look into this, think I might try to implement it so it does not even put those files into $tests, might mean a little more code but well :)
 [2007-08-16 15:45 UTC] dufuz (Helgi ├×ormar)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. In case you want to use my fix then look at: http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Command/Test.php?r1=1.24&r2=1.25 Please test it and tell me how it goes :-) Thanks