Tests fail in cpan, succeed manually

Discussion in 'Perl Misc' started by J Krugman, Apr 10, 2004.

  1. J Krugman

    J Krugman Guest

    I'm trying to understand what's going on, and decide what to do.
    When I attemptto install the module XML::Validator::Schema via
    CPAN.pm, all attempted tests fail:

    Failed Test Status Wstat Total Fail Failed List of Failed
    --------------------------------------------------------------------------------t/01basic.t 2 2 100.00% 1-2
    t/02yaml.t 152 152 100.00% 1-152
    t/03types.t 163 163 100.00% 1-163
    t/04model.t 38 38 100.00% 1-38
    2 tests skipped.
    Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00% okay.
    make: *** [test_dynamic] Error 29
    /usr/bin/make test -- NOT OK
    Running make install
    make test had returned bad status, won't install without force

    But when I run these tests "by hand" (e.g. in the build directory,
    perl -Mlib='./blib/lib' t/01basic.t), they *all* succeed.

    This is a very unusual situation. My installations via CPAN.pm
    typically succeed, and if they fail because of some failed test,
    this test fails also when invoked manually.

    Can someone tell me why these tests would fail when invoked through
    CPAN.pm, but not when they are invoked manually? And should I
    disregard CPAN.pm's warnings in this case and force the installation?

    Thanks!

    jill

    --
    To s&e^n]d me m~a}i]l r%e*m?o\v[e bit from my a|d)d:r{e:s]s.
    J Krugman, Apr 10, 2004
    #1
    1. Advertising

  2. On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:



    >
    > I'm trying to understand what's going on, and decide what to do. When I
    > attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > attempted tests fail:
    >
    > Failed Test Status Wstat Total Fail Failed List of Failed
    >
    > --------------------------------------------------------------------------------
    > t/01basic.t> 2 2 100.00% 1-2
    > t/02yaml.t 152 152 100.00% 1-152
    > t/03types.t 163 163 100.00% 1-163
    > t/04model.t 38 38 100.00% 1-38 2 tests skipped.
    > Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
    > okay. make: *** [test_dynamic] Error 29
    > /usr/bin/make test -- NOT OK
    > Running make install
    > make test had returned bad status, won't install without force
    >
    > But when I run these tests "by hand" (e.g. in the build directory, perl
    > -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
    >
    > This is a very unusual situation. My installations via CPAN.pm
    > typically succeed, and if they fail because of some failed test, this
    > test fails also when invoked manually.
    >
    > Can someone tell me why these tests would fail when invoked through
    > CPAN.pm, but not when they are invoked manually? And should I disregard
    > CPAN.pm's warnings in this case and force the installation?


    Some modules respond well to (when making by hand):
    make test TEST_VERBOSE=1

    This, if the module is willing, will produce verbose output that *may*
    help you make this decision.

    You could look at the test(s) being performed. In this case, you can type
    (in the CPAN shell) "look XML::Validator::Schema", then examine the files
    in the 't' directory.

    You could also look over the README and INSTALL files for the module. I've
    found that (for example, the various DBD modules) there need to be some
    environment settings that need to be set *before* the install is done.

    Just FYI - there *should* be no difference doing an install by hand or
    using CPAN. CPAN just "automates" the exercise of installing a module.

    Just my $0.02 :)

    HTH

    Jim
    James Willmore, Apr 10, 2004
    #2
    1. Advertising

  3. J Krugman

    J Krugman Guest

    In <> James Willmore <> writes:

    >On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:
    >> I'm trying to understand what's going on, and decide what to do. When I
    >> attemptto install the module XML::Validator::Schema via CPAN.pm, all
    >> attempted tests fail:
    >>
    >> Failed Test Status Wstat Total Fail Failed List of Failed
    >>
    >> --------------------------------------------------------------------------------
    >> t/01basic.t> 2 2 100.00% 1-2
    >> t/02yaml.t 152 152 100.00% 1-152
    >> t/03types.t 163 163 100.00% 1-163
    >> t/04model.t 38 38 100.00% 1-38 2 tests skipped.
    >> Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
    >> okay. make: *** [test_dynamic] Error 29
    >> /usr/bin/make test -- NOT OK
    >> Running make install
    >> make test had returned bad status, won't install without force
    >>
    >> But when I run these tests "by hand" (e.g. in the build directory, perl
    >> -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
    >>
    >> This is a very unusual situation. My installations via CPAN.pm
    >> typically succeed, and if they fail because of some failed test, this
    >> test fails also when invoked manually.
    >>
    >> Can someone tell me why these tests would fail when invoked through
    >> CPAN.pm, but not when they are invoked manually? And should I disregard
    >> CPAN.pm's warnings in this case and force the installation?


    >Some modules respond well to (when making by hand):
    > make test TEST_VERBOSE=1


    >This, if the module is willing, will produce verbose output that *may*
    >help you make this decision.


    This helped, but I'm not quite there yet. I discovered that the
    problem is not with CPAN.pm. If I run

    make test

    outside of the cpan shell, I get the same failure messages, but if
    I run the tests individually (as described above) they all succeed.

    When I ran

    make test TEST_VERBOSE=1

    as you suggested, I discovered that all the subtests succeed, but
    somehow make (or something else) declares these tests failed. For
    example:

    t/01basic...........ok 1 - use XML::Validator::Schema;
    ok 2
    1..2
    FAILED tests 1-2
    Failed 2/2 tests, 0.00% okay

    ....and so on for every test in t. Does anyone have any guesses as to
    why these tests are being incorrectly classified as failures?

    I have a hunch that the problem has something to do with the fact
    that these tests use Test::More instead of Test, but I don't know
    enough about Test::More to know for sure whether this is the case,
    or whether the problem is in Test::More or in how it is being used
    by the author of the failing tests.

    BTW, I tried reporting a bug about the XML::Validator::Schema
    installation at http://rt.cpan.org (per instructions in the
    XML::Validator::Schema man page), but I get a very strange error
    message to the effect that the site is down (the error message is
    strange because it gives no indication that the requested page has
    anything to do with Perl or CPAN). *sigh*

    It looks like I'm standing on a mountain of bugs...

    It is ironic that someone who bothered to set up a test suite for
    his/her module, did not bother to make sure that the installation
    itself was bug-free...

    At times like these I wonder about the future of open software.
    It's not like I'm not doing my part. I devote most of my paid and
    spare time to coding free, open software products... But I spend
    an inordinate amount of time, far too much, chasing and reporting
    bugs... Sorry, but it really pisses me off.

    Maybe open the software paradigm is not such a good idea after all.
    True, paid software can be very buggy, and those who sell software
    (notably Microsoft) seem to be able to get away with murder in this
    respect, but with the paid software model at least there is a
    *possibility* that in the future those selling buggy software will
    be held accountable. With free software even that slim hope is
    out of the question.

    jill
    --
    To s&e^n]d me m~a}i]l r%e*m?o\v[e bit from my a|d)d:r{e:s]s.
    J Krugman, Apr 10, 2004
    #3
  4. J Krugman

    Jim Keenan Guest

    J Krugman <> wrote in message news:<c59d3j$bk3$>...
    > In <> James Willmore <> writes:
    >
    > >On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:
    > >> I'm trying to understand what's going on, and decide what to do. When I
    > >> attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > >> attempted tests fail:
    > >>

    The module's author recommends this mailing list for support:

    http://listserv.activestate.com/mailman/listinfo/perl-xml

    Have you tried that yet?

    Jim Keenan
    Jim Keenan, Apr 11, 2004
    #4
  5. J Krugman

    Jim Keenan Guest

    J Krugman <> wrote in message news:<c59d3j$bk3$>...
    > In <> James Willmore <> writes:
    >
    > >On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:
    > >> I'm trying to understand what's going on, and decide what to do. When I
    > >> attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > >> attempted tests fail:
    > >>

    For the heck of it, I decided to try to install this module via the
    CPAN shell. I was not anticipating good results, because the box on
    which I was installing it is Windows98, Perl 5.6.1 only -- and in the
    past, whenever I have tried to install a module with many
    prerequisites such as this one, my system has gagged. And since I had
    few of the prereqs installed, the installation took nearly 10 minutes.
    At least 5 different prereqs had to be installed before the shell got
    to this module.

    However, it worked. All the tests passed and XML::Validator::Schema
    was installed. So I haven't been able to reproduce your problem.
    Sorry.

    Jim Keenan
    Jim Keenan, Apr 11, 2004
    #5
  6. J Krugman

    J Krugman Guest

    In <> (Jim Keenan) writes:

    >J Krugman <> wrote in message news:<c59d3j$bk3$>...
    >> In <> James Willmore <> writes:
    >>
    >> >On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:
    >> >> I'm trying to understand what's going on, and decide what to do. When I
    >> >> attemptto install the module XML::Validator::Schema via CPAN.pm, all
    >> >> attempted tests fail:
    >> >>

    >The module's author recommends this mailing list for support:


    >http://listserv.activestate.com/mailman/listinfo/perl-xml


    >Have you tried that yet?


    Yes, long ago. I'm still waiting to get my request to join the
    list approved.

    jill

    --
    To s&e^n]d me m~a}i]l r%e*m?o\v[e bit from my a|d)d:r{e:s]s.
    J Krugman, Apr 11, 2004
    #6
  7. On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:



    >
    > I'm trying to understand what's going on, and decide what to do. When I
    > attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > attempted tests fail:
    >
    > Failed Test Status Wstat Total Fail Failed List of Failed
    > --------------------------------------------------------------------------------t/01basic.t
    > 2 2 100.00% 1-2 t/02yaml.t 152
    > 152 100.00% 1-152 t/03types.t 163 163 100.00% 1-163
    > t/04model.t 38 38 100.00% 1-38 2 tests skipped.
    > Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
    > okay. make: *** [test_dynamic] Error 29
    > /usr/bin/make test -- NOT OK
    > Running make install
    > make test had returned bad status, won't install without force
    >
    > But when I run these tests "by hand" (e.g. in the build directory, perl
    > -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
    >
    > This is a very unusual situation. My installations via CPAN.pm
    > typically succeed, and if they fail because of some failed test, this
    > test fails also when invoked manually.
    >
    > Can someone tell me why these tests would fail when invoked through
    > CPAN.pm, but not when they are invoked manually? And should I disregard
    > CPAN.pm's warnings in this case and force the installation?


    Some modules respond well to (when making by hand): make test
    TEST_VERBOSE=1

    This, if the module is willing, will produce verbose output that *may*
    help you make this decision.

    You could look at the test(s) being performed. In this case, you can type
    (in the CPAN shell) "look XML::Validator::Schema", then examine the files
    in the 't' directory.

    You could also look over the README and INSTALL files for the module. I've
    found that (for example, the various DBD modules) there need to be some
    environment settings that need to be set *before* the install is done.

    Just FYI - there *should* be no difference doing an install by hand or
    using CPAN. CPAN just "automates" the exercise of installing a module.

    Just my $0.02 :)

    HTH

    Jim
    James Willmore, Apr 26, 2004
    #7
  8. On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:



    >
    > I'm trying to understand what's going on, and decide what to do. When I
    > attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > attempted tests fail:
    >
    > Failed Test Status Wstat Total Fail Failed List of Failed
    >
    > --------------------------------------------------------------------------------
    > t/01basic.t> 2 2 100.00% 1-2
    > t/02yaml.t 152 152 100.00% 1-152
    > t/03types.t 163 163 100.00% 1-163
    > t/04model.t 38 38 100.00% 1-38 2 tests skipped.
    > Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
    > okay. make: *** [test_dynamic] Error 29
    > /usr/bin/make test -- NOT OK
    > Running make install
    > make test had returned bad status, won't install without force
    >
    > But when I run these tests "by hand" (e.g. in the build directory, perl
    > -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
    >
    > This is a very unusual situation. My installations via CPAN.pm
    > typically succeed, and if they fail because of some failed test, this
    > test fails also when invoked manually.
    >
    > Can someone tell me why these tests would fail when invoked through
    > CPAN.pm, but not when they are invoked manually? And should I disregard
    > CPAN.pm's warnings in this case and force the installation?


    Some modules respond well to (when making by hand):
    make test TEST_VERBOSE=1

    This, if the module is willing, will produce verbose output that *may*
    help you make this decision.

    You could look at the test(s) being performed. In this case, you can type
    (in the CPAN shell) "look XML::Validator::Schema", then examine the files
    in the 't' directory.

    You could also look over the README and INSTALL files for the module. I've
    found that (for example, the various DBD modules) there need to be some
    environment settings that need to be set *before* the install is done.

    Just FYI - there *should* be no difference doing an install by hand or
    using CPAN. CPAN just "automates" the exercise of installing a module.

    Just my $0.02 :)

    HTH

    Jim
    James Willmore, Apr 26, 2004
    #8
  9. On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:


    >
    >
    > I'm trying to understand what's going on, and decide what to do. When I
    > attemptto install the module XML::Validator::Schema via CPAN.pm, all
    > attempted tests fail:
    >
    > Failed Test Status Wstat Total Fail Failed List of Failed
    > --------------------------------------------------------------------------------t/01basic.t
    > 2 2 100.00% 1-2 t/02yaml.t 152
    > 152 100.00% 1-152 t/03types.t 163 163 100.00% 1-163
    > t/04model.t 38 38 100.00% 1-38 2 tests skipped.
    > Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
    > okay. make: *** [test_dynamic] Error 29
    > /usr/bin/make test -- NOT OK
    > Running make install
    > make test had returned bad status, won't install without force
    >
    > But when I run these tests "by hand" (e.g. in the build directory, perl
    > -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
    >
    > This is a very unusual situation. My installations via CPAN.pm
    > typically succeed, and if they fail because of some failed test, this
    > test fails also when invoked manually.
    >
    > Can someone tell me why these tests would fail when invoked through
    > CPAN.pm, but not when they are invoked manually? And should I disregard
    > CPAN.pm's warnings in this case and force the installation?


    Some modules respond well to (when making by hand): make test
    TEST_VERBOSE=1

    This, if the module is willing, will produce verbose output that *may*
    help you make this decision.

    You could look at the test(s) being performed. In this case, you can type
    (in the CPAN shell) "look XML::Validator::Schema", then examine the files
    in the 't' directory.

    You could also look over the README and INSTALL files for the module. I've
    found that (for example, the various DBD modules) there need to be some
    environment settings that need to be set *before* the install is done.

    Just FYI - there *should* be no difference doing an install by hand or
    using CPAN. CPAN just "automates" the exercise of installing a module.

    Just my $0.02 :)

    HTH

    Jim
    James Willmore, Apr 26, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,081
    bcoulson
    Aug 31, 2009
  2. Anonymousgoogledeja

    how can i Know whether atoi function call succeed?

    Anonymousgoogledeja, Aug 22, 2005, in forum: C Programming
    Replies:
    15
    Views:
    959
    Jack Klein
    Aug 23, 2005
  3. dotnet
    Replies:
    0
    Views:
    329
    dotnet
    Aug 21, 2009
  4. carl d.
    Replies:
    1
    Views:
    370
    A. Sinan Unur
    May 10, 2005
  5. fl
    Replies:
    2
    Views:
    225
    Bill Gill
    Jan 5, 2013
Loading...

Share This Page