From c6276a8d789d2865535f65c6060ea8d13c487ceb Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sat, 20 Dec 2014 10:15:34 -0500 Subject: [PATCH] update release tests and diagnostic --- t/00_diag.t | 10 ++++++---- xt/release/fixme.t | 3 ++- xt/release/pod_coverage.t | 3 +++ xt/release/pod_spelling_common.t | 12 ++++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/t/00_diag.t b/t/00_diag.t index 02edd81..f913073 100644 --- a/t/00_diag.t +++ b/t/00_diag.t @@ -11,10 +11,12 @@ BEGIN { } || die $@; do { my $fh; - open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.pre.txt')); - @modules = <$fh>; - close $fh; - chomp @modules; + if(open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.pre.txt'))) + { + @modules = <$fh>; + close $fh; + chomp @modules; + } }; eval qq{ require $_ } for @modules; }; diff --git a/xt/release/fixme.t b/xt/release/fixme.t index 7f7ee20..9dac4c6 100644 --- a/xt/release/fixme.t +++ b/xt/release/fixme.t @@ -3,7 +3,7 @@ use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::Fixme' - unless eval q{ use Test::Fixme; 1 }; + unless eval q{ use Test::Fixme 0.14; 1 }; }; use Test::Fixme 0.07; use FindBin; @@ -14,5 +14,6 @@ chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); run_tests( match => qr/FIXME/, where => [ grep { -e $_ } qw( bin lib t Makefile.PL )], + warn => 1, ); diff --git a/xt/release/pod_coverage.t b/xt/release/pod_coverage.t index af899c0..49eff90 100644 --- a/xt/release/pod_coverage.t +++ b/xt/release/pod_coverage.t @@ -27,6 +27,9 @@ chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); my @private_classes; my %private_methods; +push @{ $config->{pod_coverage}->{private} }, + 'Alien::.*::Install::Files#Inline'; + foreach my $private (@{ $config->{pod_coverage}->{private} }) { my($class,$method) = split /#/, $private; diff --git a/xt/release/pod_spelling_common.t b/xt/release/pod_spelling_common.t index 4ee3dcf..ad8dffd 100644 --- a/xt/release/pod_spelling_common.t +++ b/xt/release/pod_spelling_common.t @@ -4,11 +4,23 @@ use Test::More; BEGIN { plan skip_all => 'test requires Test::Pod::Spelling::CommonMistakes' unless eval q{ use Test::Pod::Spelling::CommonMistakes; 1 }; + plan skip_all => 'test requires YAML' + unless eval q{ use YAML qw( LoadFile ); 1 }; }; use Test::Pod::Spelling::CommonMistakes; use FindBin; use File::Spec; +my $config_filename = File::Spec->catfile( + $FindBin::Bin, 'release.yml' +); + +my $config; +$config = LoadFile($config_filename) + if -r $config_filename; + +plan skip_all => 'disabled' if $config->{pod_spelling_common}->{skip}; + chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); # FIXME test files in bin too.