jonathanstowe / Test-META

Test that a Perl 6 project has a good and proper META file
Artistic License 2.0
10 stars 10 forks source link

Report missing modules? #8

Open cjfields opened 8 years ago

cjfields commented 8 years ago

At the moment, if the META.info doesn't contain all modules the test fails. However, it doesn't report how many (or which) files are possibly missing, which may be informative if the distributions have many modules present.

cjfields commented 8 years ago

Probably best marked as an enhancement request :smile:

jonathanstowe commented 8 years ago

Hi, I thought it did to be honest, at least in my testing it produces loads of diagnistics like :

t/020-internals.t .. 1/? # required attribute 'perl' is not defined
# required attribute 'name' is not defined
# required attribute 'version' is not defined
# required attribute 'description' is not defined
# file for 'HH::GG' 'lib/Boodle' does not exist
# file for 'Test::META' '/lib/Test/META.pm' is absolute, it should be relative to the dist directory
# there is an 'author' field rather than the specified 'authors'
t/020-internals.t .. ok    

But I'm quite willing to believe something further up the chain is eating the diag output. I guess I could make each file in the provides a test in itself, of course this makes it harder to test itself but that'll be my problem :)

Thanks for your input.

cjfields commented 8 years ago

Looks like that may be true (see # required attribute 'perl' is not defined):

(Python3)[cjfields@cjfields-imac bioperl6 (master)]$ prove6 -lrv t/00-meta.t
t/00-meta.t ..
1..1
    ok 1 - have a META file
    ok 2 - META parses okay
    # required attribute 'perl' is not defined
    not ok 3 - have all required entries

# Failed test 'have all required entries'
# at /Users/cjfields/.perl6/share/perl6/site/sources/D4290566C3B5FE843B27C8DE886900BB1A1B70D3 line 91
    ok 4 - 'provides' looks sane
    ok 5 - Optional 'authors' and not 'author'
    ok 6 - name has a hypen rather than '::' (if this is intentional please pass :relaxed-name to meta-ok)
    ok 7 - no 'v' in version strings (meta6 version greater than 0)
    1..7
    # Looks like you failed 1 test of 7
not ok 1 - Project META file is good

# Failed test 'Project META file is good'
# at /Users/cjfields/.perl6/share/perl6/site/sources/D4290566C3B5FE843B27C8DE886900BB1A1B70D3 line 71
# Looks like you failed 1 test of 1
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

Test Summary Report
-------------------
t/00-meta.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.55 cusr  0.05 csys =  0.61 CPU)
Result: FAIL

I've pushed these to GitHub, code: https://github.com/cjfields/bioperl6

jonathanstowe commented 8 years ago

Cool :)