more info to come
t/Creators.t always fails, from a git repo on latest master (3b23fb8) mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c ' export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t ' k316x1 t/Creators.t .. 1..16 ok 1 - use C4::Creators; ok 2 - use C4::Creators::PDF; ok 3 - testing new() works ok 4 - testing pdf file created ok 5 - testing Add() works ok 6 - testing Bookmark() works ok 7 - testing Compress() works ok 8 - testing Font() works ok 9 - testing FontSize() is set to 12 by default ok 10 - testing FontSize() can be set to a different value ok 11 - testing Page() works ok 12 - testing StrWidth() returns correct point width ok 13 - testing Text() writes from a given x-value ok 14 - testing Text() writes to the correct x-value print() on closed filehandle $fh at /home/mason/g/k/3.16.x/C4/Creators/PDF.pm line 65, <$fh> chunk 1. ok 15 - testing End() works not ok 16 - test.pdf created # Failed test 'test.pdf created' # at t/Creators.t line 59. # Looks like you failed 1 test of 16. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/16 subtests Test Summary Report ------------------- t/Creators.t (Wstat: 256 Tests: 16 Failed: 1) Failed test: 16 Non-zero exit status: 1 Files=1, Tests=16, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.47 cusr 0.07 csys = 0.58 CPU) Result: FAIL
Created attachment 41188 [details] [review] Bug 14602 - Fix failing t/Creators.t test to test.. 1/ run t/Creators.t test from git repo, get a FAIL 2/ apply patch 3/ repeat step 1, get a PASS mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c 'export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t' k316x1 t/Creators.t .. 1..16 ok 1 - use C4::Creators; ok 2 - use C4::Creators::PDF; ok 3 - testing new() works ok 4 - testing pdf file created ok 5 - testing Add() works ok 6 - testing Bookmark() works ok 7 - testing Compress() works ok 8 - testing Font() works ok 9 - testing FontSize() is set to 12 by default ok 10 - testing FontSize() can be set to a different value ok 11 - testing Page() works ok 12 - testing StrWidth() returns correct point width ok 13 - testing Text() writes from a given x-value ok 14 - testing Text() writes to the correct x-value ok 15 - testing End() works ok 16 - test file /tmp/4YjPQDExeS created OK ok All tests successful. Files=1, Tests=16, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.48 cusr 0.05 csys = 0.57 CPU) Result: PASS
Created attachment 41303 [details] [review] Bug 14602 - Fix failing t/Creators.t test to test.. 1/ run t/Creators.t test from git repo, get a FAIL 2/ apply patch 3/ repeat step 1, get a PASS mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c 'export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t' k316x1 t/Creators.t .. 1..16 ok 1 - use C4::Creators; ok 2 - use C4::Creators::PDF; ok 3 - testing new() works ok 4 - testing pdf file created ok 5 - testing Add() works ok 6 - testing Bookmark() works ok 7 - testing Compress() works ok 8 - testing Font() works ok 9 - testing FontSize() is set to 12 by default ok 10 - testing FontSize() can be set to a different value ok 11 - testing Page() works ok 12 - testing StrWidth() returns correct point width ok 13 - testing Text() writes from a given x-value ok 14 - testing Text() writes to the correct x-value ok 15 - testing End() works ok 16 - test file /tmp/4YjPQDExeS created OK ok All tests successful. Files=1, Tests=16, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.48 cusr 0.05 csys = 0.57 CPU) Result: PASS Signed-off-by: Liz Rea <liz@catalyst.net.nz>
It passes for me (using a dev install from git).
ping Mason! % git checkout -b bug_14602 3b23fb8 Switched to a new branch 'bug_14602' % prove t/Creators.t t/Creators.t .. ok All tests successful. Files=1, Tests=16, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.60 cusr 0.02 csys = 0.66 CPU) Result: PASS
(In reply to Jonathan Druart from comment #4) > It passes for me (using a dev install from git). if you use koha-shell to run tests (and you should be!), it will fail so, bug still exists for some situations
(In reply to Mason James from comment #6) > (In reply to Jonathan Druart from comment #4) > > It passes for me (using a dev install from git). > > if you use koha-shell to run tests (and you should be!), it will fail > > so, bug still exists for some situations I'm not against the patch, but Liz, didn't w find a koha-shell bug the other day? Maybe it is related
Naw, that bug is that on a gitified install koha-shell uses the system /usr/share/koha PERL5LIB instead of the one from the git install, and that can cause general test weirdness. I think this is different, I get this issue in my vagrant and/or gitify installs as well. Something to do with the fact that it can't write a temp file, but I didn't have time to try and fix it.
(In reply to Liz Rea from comment #8) > I think this is different, I get this issue in my vagrant and/or gitify > installs as well. Something to do with the fact that it can't write a temp > file, but I didn't have time to try and fix it. yep, thats all correct ^ :)
Created attachment 42315 [details] [review] Bug 14602 - Fix failing t/Creators.t test to test.. 1/ run t/Creators.t test from git repo, get a FAIL 2/ apply patch 3/ repeat step 1, get a PASS mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c 'export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t' k316x1 t/Creators.t .. 1..16 ok 1 - use C4::Creators; ok 2 - use C4::Creators::PDF; ok 3 - testing new() works ok 4 - testing pdf file created ok 5 - testing Add() works ok 6 - testing Bookmark() works ok 7 - testing Compress() works ok 8 - testing Font() works ok 9 - testing FontSize() is set to 12 by default ok 10 - testing FontSize() can be set to a different value ok 11 - testing Page() works ok 12 - testing StrWidth() returns correct point width ok 13 - testing Text() writes from a given x-value ok 14 - testing Text() writes to the correct x-value ok 15 - testing End() works ok 16 - test file /tmp/4YjPQDExeS created OK ok All tests successful. Files=1, Tests=16, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.48 cusr 0.05 csys = 0.57 CPU) Result: PASS Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Mason James from comment #9) > (In reply to Liz Rea from comment #8) > > I think this is different, I get this issue in my vagrant and/or gitify > > installs as well. Something to do with the fact that it can't write a temp > > file, but I didn't have time to try and fix it. > > yep, thats all correct ^ :) It wrote in the current directory..
Patch pushed to master. Thanks Mason! Note: I didn't reproduce the problem, but I agree with the change and it doesn't break tests.