Not sure what I was thinking, but 18637ebb never worked :/
While at it work around the newly-discovered RT#106935
Peter Rabbitson
8 years ago
2 | 2 |
|
3 | 3 |
use warnings;
|
4 | 4 |
use strict;
|
|
5 |
|
|
6 |
# temporary, to load MRO::Compat, will be soon entirely rewritten anyway
|
|
7 |
use DBIx::Class::_Util;
|
5 | 8 |
|
6 | 9 |
use base 'Data::Page';
|
7 | 10 |
use mro 'c3';
|
1 | 1 |
use strict;
|
2 | 2 |
|
3 | 3 |
use Test::More;
|
|
4 |
use File::Find;
|
|
5 |
use File::Spec;
|
|
6 |
use Config;
|
4 | 7 |
use lib 't/lib';
|
5 | 8 |
use DBICTest;
|
6 | 9 |
|
|
17 | 20 |
# that are related to lib/ - then we should be able to run
|
18 | 21 |
# perl -c checks (via syntax_ok), and all should just work
|
19 | 22 |
my $missing_groupdeps_present = grep
|
20 | |
{ DBIx::Class::Optional::Dependencies->req_ok_for($_) }
|
|
23 |
{ ! DBIx::Class::Optional::Dependencies->req_ok_for($_) }
|
21 | 24 |
grep
|
22 | 25 |
{ $_ !~ /^ (?: test | rdbms | dist ) _ /x }
|
23 | 26 |
keys %{DBIx::Class::Optional::Dependencies->req_group_list}
|
24 | 27 |
;
|
|
28 |
|
|
29 |
# don't test syntax when RT#106935 is triggered (mainly CI)
|
|
30 |
# FIXME - remove when RT is resolved
|
|
31 |
my $tainted_relpath = (
|
|
32 |
length $ENV{PATH}
|
|
33 |
and
|
|
34 |
${^TAINT}
|
|
35 |
and
|
|
36 |
grep
|
|
37 |
{ ! File::Spec->file_name_is_absolute($_) }
|
|
38 |
split /\Q$Config{path_sep}/, $ENV{PATH}
|
|
39 |
) ? 1 : 0;
|
25 | 40 |
|
26 | 41 |
find({
|
27 | 42 |
wanted => sub {
|
|
39 | 54 |
Test::Strict::strict_ok($f);
|
40 | 55 |
Test::Strict::warnings_ok($f);
|
41 | 56 |
|
42 | |
Test::Strict::syntax_ok($f)
|
43 | |
if ! $missing_groupdeps_present and $f =~ /^ (?: lib )/x;
|
|
57 |
Test::Strict::syntax_ok($f) if (
|
|
58 |
! $tainted_relpath
|
|
59 |
and
|
|
60 |
! $missing_groupdeps_present
|
|
61 |
and
|
|
62 |
$f =~ /^ (?: lib )/x
|
|
63 |
);
|
44 | 64 |
},
|
45 | 65 |
no_chdir => 1,
|
46 | 66 |
}, (qw(lib t examples maint)) );
|