CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
makefile.PL or make dist skips my test modules, rendering make test useless



Oct 2, 2013, 11:29 PM

Post #1 of 1 (1587 views)
makefile.PL or make dist skips my test modules, rendering make test useless Can't Post


I have uploaded one module to CPAN and I'm trying to prepare another. I carefully wrote 5 test modules (suffixed .t) in my <module>/t directory and, before trying to do run, have run each of those test modules.

Following Sam Tregar's book Writing Perl Modules for CPAN to the letter (I'd like to think) I ran perl before the make dist.

In order to simulate a download, I copied the .tar.gz file to a Download directory and unpacked it. Upon running make test I get pretty useless output:

PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t 
t/Math-Yapp.t .. t/Math-Yapp.t .. 1/1 t/Math-Yapp.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.09 sys + 0.19 cusr 0.08 csys = 0.39 CPU)
Result: PASS

Eh! Wo hoppen to my verbose test output?! Mad

I then discovered that none of my test modules in my development t directory had made it out to the distribution copy. All that got "distributed" was the original <module-name>.t file that was created when I ran h2xs in the first place.

My test modules are named things like:
  • 001_constructors.t
  • 002_operations.t
  • etc.

    Yes, I could probably stuff all that testing code into the <module-name>.t file but I didn't have to do that with my other CPAN module. And I don't believe I should need to either; the book specifically mentions naming the test modules with numeric prefixes, presumably to control the order of the tests.

    So now I get to the obvious question:
    How do I get these all the files in <module-name>.t to distribute with the rest of the module?

    Thanks much!
    -- Rasputin Paskudniak (In perpetual pursuit of undomesticated, semi-aquatic avians)


    Search for (options) Powered by Gossamer Forum v.1.2.0

    Web Applications & Managed Hosting Powered by Gossamer Threads
    Visit our Mailing List Archives