Hi Chris I'm guessing you made some change because I saw some test reports from you reporting FAIL and UNKNOWN. I've decided to take a different tack.
To reiterate what I'm trying to do: The module in question, Data::Babel, relies heavily on MySQL, and the tests require the ability to create and drop MySQL databases, tables, etc. The distribution includes a check for these capabilities. I'm trying to find a clean way to communicate to the installation driver that the required capabilities are not available. This is very common. If I simply generate a FAIL under these conditions, the module will accumulate a large pile of FAIL reports which I deem to be undesirable. I read on some Perl website (but have no record where and can't find it now) that the correct idiom for communicating such information to the installation driver is for Build.PL to exit(0) and not create the Build script. I've come to realize this is not the correct idiom based on the fact that all testers but one (or maybe two) who've tested my module treat this condition as a PASS and generate a test report with no output. Here's what I'm doing now. (1) I removed the check for MySQL capabilities from Build.PL and always create the Build script. (2) I moved the check into a test script; this test asserts TAP version 13, and if the check fails, emits a pragma saying 'stop testing'. (3) I check for the pragma in a customized Build::run_tap_harness method, and break out of the main test loop before running any tests that need MYSQL. (BTW, I've been using a customized run_tap_harness method all along (and do so in many distributions) to support compound tests). The net effect is that if the required MySQL capabilities are not available, 'Build test' runs a truncated test suite and reports PASS. This is better than what's happening now but not ideal for the obvious reason that it overstates the situations in which my module has been successfully tested. It would be better to report UNKOWN or NA or something in these cases, but I don't know how to make this happen robustly. Thanks for your help with this issue and all the work you do to keep Perl the best programming community in existence! Best, Nat On Jul 20, 2013, at 12:07 PM, Nathan (Nat) Goodman wrote: > Hi Chris > > I'm still seeing test reports with no output. Any chance this bug will be > fixed soon? Just wondering. > > Thanks, > Nat > > On Dec 4, 2012, at 2:02 PM, Chris 'BinGOs' Williams wrote: > >> On Tue, Dec 04, 2012 at 11:59:47AM -0800, Nathan (Nat) Goodman wrote: >>> Thanks, Chris! I appreciate the response. >>> >>> Best, >>> Nat >>> >> >> Further to my previous message, after building a v5.16.2 perl, setting up >> with Test::Reporter::Transport::File and doing numerous tests I have tracked >> down a bug in CPANPLUS::Dist::Build, the installer type for Module::Build >> based distributions in CPANPLUS. >> >> It seems if a Build.PL exits with 0 (like yours does) without generating a >> Build script, that CPANPLUS::Dist::Build then proceeds to try and run this >> mythical Build script and eventually generates a PASS report without any >> content. This is obviously wrong. >> >> I'm working on a solution. >> >> You can pretty much disregard any PASS test reports from me that have >> no test output. >> >> Cheers, >> >> -- >> Chris Williams >> aka BinGOs >> PGP ID 0x4658671F >> http://www.gumbynet.org.uk >> ========================== >