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

Bug #14884 Tests should skip if no configuration is available
Submitted: 2008-10-26 10:51 UTC
From: doconnor Assigned: danielc
Status: Closed Package: DB (version CVS)
PHP Version: 5.2.4 OS:
Roadmaps: 1.7.14RC2    
Subscription  


 [2008-10-26 10:51 UTC] doconnor (Daniel O'Connor)
Description: ------------ (and include_paths Should Just Work) Test script: --------------- clockwerx@clockwerx-desktop:~/pear/DB$ pear run-tests tests/* Expected result: ---------------- Tests skip as appropriate Actual result: -------------- Tests fail

Comments

 [2008-12-27 17:01 UTC] danielc (Daniel Convissor)
The files are included by a relative path rather than include_path because it's possible to have multiple installations and variations that need testing and you need to know exactly what's being tested.
 [2008-12-28 00:34 UTC] doconnor (Daniel O'Connor)
Unfortunately, that means that none of these tests can work with the pear wide test suite. IE: clockwerx@clockwerx-desktop:~/pear/DB$ pear run-tests tests/db_error.phpt produces results of: Warning: require_once(./include.inc): failed to open stream: No such file or directory in /home/clockwerx/pear/DB/tests/db_error.php on line 2 Fatal error: require_once(): Failed opening required './include.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /home/clockwerx/pear/DB/tests/db_error.php on line 2 alternatively, instead of ./include.inc; dirname(__FILE__) . '/include.inc'; could be used
 [2008-12-28 16:31 UTC] danielc (Daniel Convissor)
The doc/TESTERS file explains that you're supposed to "cd pear/tests/DB/tests" before running the test suite.
 [2008-12-28 16:51 UTC] doconnor (Daniel O'Connor)
 [2009-01-24 02:41 UTC] doconnor (Daniel O'Connor)
Psst, DanC have you seen http://www.lauken.com/doconnor/results.txt by any chance? It runs overnight. Currently, to make DB not pollute those results with false positives, I've got the attached patch applied - but its a PITA if someone else wants to just do a checkout of PEAR and run all of the unit tests.
 [2009-02-03 18:42 UTC] till (Till Klampaeckel)
Could you us ob_start(), ob_get_contents() and ob_end_clean() to trap fatals?
 [2009-02-06 04:23 UTC] danielc (Daniel Convissor)
-Status: Wont fix +Status: Assigned -Assigned To: +Assigned To: dconnor
dconnor: The "dirname(__FILE__) . '/include.inc'" is the way to go. Feel free to commit that. I've assigned this ticket to you. Thanks!
 [2009-07-19 22:24 UTC] danielc (Daniel Convissor)
-Status: Assigned +Status: Closed -Assigned To: dconnor +Assigned To: danielc
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.