test compilation of all scripts and modules (#537)

* test compilation of all scripts and modules passes

* try adding NetSNMP::default_store

* try adding NetSNMP::default_store

* travis test all branches

* make Configuration.pm safe for tests

* remove dep

* try adding net-snmp

* dist: xenial

* try building Net-SNMP locally

* no need for Try::Tiny

* allow test to pass for DPP:p

* better testing setup for session cookies

* yay! working compile tests for ALL!
This commit is contained in:
Oliver Gorwits
2019-03-12 13:02:35 +00:00
committed by GitHub
parent a138325175
commit 65f695410e
5 changed files with 46 additions and 9 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();