Skip Menu |

This queue is for tickets about the Net-CUPS CPAN distribution.

Report information
The Basics
Id: 38469
Status: resolved
Priority: 0/
Queue: Net-CUPS

People
Owner: Nobody in particular
Requestors: grousse [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.57
Fixed in: (no value)



Subject: test failure
On mandriva linux, using perl 5.10: [guillomovitch@n2 Net-CUPS-0.57]$ prove -b t/03_destination.t t/03_destination....2/11 # Failed test at t/03_destination.t line 24. # Failed test at t/03_destination.t line 28. Use of uninitialized value in subroutine entry at blib/lib/Net/CUPS.pm line 1175. # Failed test at t/03_destination.t line 32. # Failed test at t/03_destination.t line 43. Can't call method "getDescription" on an undefined value at t/03_destination.t line 45. # Looks like you planned 11 tests but only ran 8. # Looks like you failed 4 tests of 8 run. # Looks like your test died just after 8. t/03_destination.... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 7/11 subtests Test Summary Report ------------------- t/03_destination (Wstat: 65280 Tests: 8 Failed: 4) Failed tests: 5-8 Non-zero exit status: 255 Parse errors: Bad plan. You planned 11 tests but ran 8. Files=1, Tests=8, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.10 cusr 0.04 csys = 0.16 CPU) Result: FAIL Failed 1/1 test programs. 4/8 subtests failed
*sigh* I get reports about Net::CUPS failing tests all of the time. If you go by the automated CPAN tests, then Net::CUPS doesn't work at all. Most of the time the problems are caused by several things: a) You don't have the cups headers installed b) You don't have a new enough version of cups installed. c) You don't have cups running on the system you are installing it on. d) You are running the tests as a user that doesn't have the ability to add/remove/modify destinations in cups. I am willing to bet your problem is option C. If you start the server on "localhost" and you run the tests again it will probably pause around test 7 due to option D. Good Luck! On Thu Aug 14 05:39:59 2008, GROUSSE wrote: Show quoted text
> On mandriva linux, using perl 5.10: > > [guillomovitch@n2 Net-CUPS-0.57]$ prove -b t/03_destination.t > t/03_destination....2/11 > # Failed test at t/03_destination.t line 24. > > # Failed test at t/03_destination.t line 28. > Use of uninitialized value in subroutine entry at blib/lib/Net/CUPS.pm > line 1175. > > # Failed test at t/03_destination.t line 32. > > # Failed test at t/03_destination.t line 43. > Can't call method "getDescription" on an undefined value at > t/03_destination.t line 45. > # Looks like you planned 11 tests but only ran 8. > # Looks like you failed 4 tests of 8 run. > # Looks like your test died just after 8. > t/03_destination.... Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 7/11 subtests > > Test Summary Report > ------------------- > t/03_destination (Wstat: 65280 Tests: 8 Failed: 4) > Failed tests: 5-8 > Non-zero exit status: 255 > Parse errors: Bad plan. You planned 11 tests but ran 8. > Files=1, Tests=8, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.10 cusr > 0.04 csys = 0.16 CPU) > Result: FAIL > Failed 1/1 test programs. 4/8 subtests failed
Le Jeu. Aoû. 14 10:32:42 2008, DHAGEMAN a écrit : Show quoted text
> Most of the time the problems are caused by several things: > > a) You don't have the cups headers installed > b) You don't have a new enough version of cups installed. > c) You don't have cups running on the system you are installing it on. > d) You are running the tests as a user that doesn't have the ability to > add/remove/modify destinations in cups. > > I am willing to bet your problem is option C. If you start the server > on "localhost" and you run the tests again it will probably pause around > test 7 due to option D.
Those problem arise when building official mandriva package on a build host, as a non-privilegied user. There is no way to force a running system cups server, nor to get add/remove printer privileges in this scenario. You should either make those tests conditionals, or launch a private local server instances for test duration, as do many apache-related modules.
How unfortunate. You should be able to safely ignore those tests without any problems. I do accept patches. Please feel free to send them to me along with a little note stating that you agree that the patch can be added under the same license as the rest of the code. I also am very adamant about giving credit where it is due, so please feel free to list an e-mail address and name you want associated with the patch in the changelog. Have a nice day! On Thu Aug 14 10:47:09 2008, GROUSSE wrote: Show quoted text
> Le Jeu. Aoû. 14 10:32:42 2008, DHAGEMAN a écrit :
> > Most of the time the problems are caused by several things: > > > > a) You don't have the cups headers installed > > b) You don't have a new enough version of cups installed. > > c) You don't have cups running on the system you are installing it on. > > d) You are running the tests as a user that doesn't have the ability to > > add/remove/modify destinations in cups. > > > > I am willing to bet your problem is option C. If you start the server > > on "localhost" and you run the tests again it will probably pause around > > test 7 due to option D.
> Those problem arise when building official mandriva package on a build > host, as a non-privilegied user. There is no way to force a running > system cups server, nor to get add/remove printer privileges in this > scenario. You should either make those tests conditionals, or launch a > private local server instances for test duration, as do many > apache-related modules.