Description of problem: The test suite fails when publican is not yet installed. Despite the recent fixes, this was not enough... # Failed test 'build a book' # at t/300.Builder.t line 30. # file error - cover.tmpl: not found This error appears several times. Test Summary Report ------------------- t/110.CreateBrand.t (Wstat: 0 Tests: 4 Failed: 0) Parse errors: Bad plan. You planned 5 tests but ran 4. t/300.Builder.t (Wstat: 256 Tests: 5 Failed: 1) Failed test: 4 Non-zero exit status: 1 t/900.publican.t (Wstat: 256 Tests: 14 Failed: 1) Failed test: 6 Non-zero exit status: 1 t/910.publican.Users_Guide.t (Wstat: 256 Tests: 5 Failed: 1) Failed test: 5 Non-zero exit status: 1 It looks like that publican is trying to get this file via the brand_dir which is equal to common_content which is equal to datadir in the build directory. But book_templates is actually outside of that directory (in blib/book_templates)... I'm not sure what a proper fix would be. That said it would be nice if you could test the test suite in a chroot where publican is not installed just to ensure that it works as expected. I got a failing testsuite for each of the release that I packaged for Debian. :-|
Created attachment 694806 [details] Patch to work-around the testsuite failures I attach the work-around that I used for now, it's just creating a symlink in the place where publican is looking for the files.
Forget the change about t/110.CreateBrand.t it's just wrong.
But there's still something fishy about this test: # Testing Publican::CreateBrand 0.2 t/110.CreateBrand.t ........... Failed 1/5 subtests [...] Test Summary Report ------------------- t/110.CreateBrand.t (Wstat: 0 Tests: 4 Failed: 0) Parse errors: Bad plan. You planned 5 tests but ran 4. Files=9, Tests=53, 97 wallclock secs ( 0.11 usr 0.00 sys + 107.19 cusr 3.32 csys = 110.62 CPU) Result: FAIL Failed 1/9 test programs. 0/53 subtests failed. dh_auto_test: perl Build test returned exit code 255 Further tests revealed that the issue is a warning that confuses the Test::Harness: $ ./Build test verbose=1 [...] t/110.CreateBrand.t .. 1..5 ok 1 - use Publican; ok 2 - use Publican::CreateBrand; ok 3 - missing mandtaor lang ok 4 - creating a Publican::CreateBrand isa Publican::CreateBrand WARNING: Unknow config key release, ignoring. ok 5 - create the brand Failed 1/5 subtests I fixed this with this change: --- a/lib/Publican.pm +++ b/lib/Publican.pm @@ -329,6 +329,12 @@ my %PARAMS = ( ), constraint => '^[0-9]', }, + release => { + descr => maketext( + 'RPM Release number' + ), + }, + web_brew_dist => { descr => maketext('The brew dist to use for building the web rpm.'), default => 'docs-5E',
The for t/110.CreateBrand.t is to fix CreateBrand, it's setting a parameter we removed ages ago. FWIW this test does not fail for me, it does emit the warming with vebose on though. $ git diff lib/Publican/CreateBrand.pm diff --git a/publican/lib/Publican/CreateBrand.pm b/publican/lib/Publican/CreateBrand.pm index a102a0b..b606e82 100644 --- a/publican/lib/Publican/CreateBrand.pm +++ b/publican/lib/Publican/CreateBrand.pm @@ -75,7 +75,6 @@ sub new { $config->param( 'type', 'brand' ); $config->param( 'version', $INIT_VERSION ); - $config->param( 'release', '0' ); my $self = bless {}, $class; Not sure if we should use the supplied patch to fix this or relocate the book_template directory to the brand, or give the book template dir it's own conf entry.
Fix committed to master for 3.1.2 hotfix. Used supplied patch, and fixed translation bug. To ssh://git.fedorahosted.org/git/publican.git 660a3ae..1e5436a master -> master
This bug has been fixed in Publican 3.1.3