Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

How to run "Build test" showing text outputs?

by llancet (Friar)
on Jan 08, 2014 at 03:33 UTC ( [id://1069719]=perlquestion: print w/replies, xml ) Need Help??

llancet has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a module with XS contents. It failed on a simple test which creates an object, but the error message are eaten by the Build script. In addition, I cannot just run the test script by "perl t/XXX.t", because the .so files under blib/arch/auto cannot be found by perl, and I don't know how to let perl found them. So, how can I run my test scripts and get the error messages?

Replies are listed 'Best First'.
Re: How to run "Build test" showing text outputs?
by davido (Cardinal) on Jan 08, 2014 at 05:36 UTC

    perl -Mblib t/xxx.t, or prove -bv t/xxx.t

    The blib module tells Perl to look in ./blib for library files. The "-b" flag for prove tells prove to invoke the -Mblib semantics.


    Dave

Re: How to run "Build test" showing text outputs?
by syphilis (Archbishop) on Jan 08, 2014 at 05:35 UTC
    I cannot just run the test script by "perl t/XXX.t", because the .so files under blib/arch/auto cannot be found by perl

    The usual way is to run the test script as "perl -Mblib t/XXX.t".

    Cheers,
    Rob
Re: How to run "Build test" showing text outputs?
by MidLifeXis (Monsignor) on Jan 08, 2014 at 14:21 UTC

    Could also do prove -Ilib t/XXX.t --verbose.

    Never mind. Didn't read davidio's answer completely.

    --MidLifeXis

Re: How to run "Build test" showing text outputs?
by llancet (Friar) on Jan 09, 2014 at 12:22 UTC
    Thanks everyone! I found that "auto" is searched via @INC, thus it can also be run via:
    perl -Iblib/arch -Iblib/lib XXX.t
      -Mblib does that for you

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1069719]
Approved by boftx
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found