test compilation of all scripts and modules passes

This commit is contained in:
Oliver Gorwits
2019-03-11 17:39:53 +00:00
parent 249f05165f
commit fdafbb735e
2 changed files with 31 additions and 0 deletions

30
xt/00-compile.t Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env perl
use strict;
use warnings;
BEGIN {
use FindBin;
FindBin::again();
use Path::Class;
# stuff useful locations into @INC and $PATH
unshift @INC,
dir($FindBin::RealBin)->parent->subdir('lib')->stringify,
dir($FindBin::RealBin, 'lib')->stringify;
}
# for netdisco app config
use App::Netdisco;
use Test::Compile;
my $test = Test::Compile->new();
my @plfiles = grep {$_ !~ m/(?:sshcollector|graph)/i} $test->all_pl_files();
my @pmfiles = grep {$_ !~ m/(?:sshcollector|graph)/i} $test->all_pm_files();
$test->ok($test->pl_file_compiles($_), "$_ compiles") for @plfiles;
$test->ok($test->pm_file_compiles($_), "$_ compiles") for @pmfiles;
$test->done_testing();