THROW AWAY this commit on rebase - dirty bootstrap
[dbsrgits/DBIx-Class.git] / t / 02_standalone_test_classes.t
CommitLineData
79061be1 1use warnings;
2use strict;
3
4use Test::More;
5use File::Find;
6
7use lib 't/lib';
c5ffac15 8use lib 't/dqlib';
79061be1 9
10find({
11 wanted => sub {
12
13 return unless ( -f $_ and $_ =~ /\.pm$/ );
14
15 my $pid = fork();
16 if (! defined $pid) {
17 die "fork failed: $!"
18 }
19 elsif (!$pid) {
20 if (my @offenders = grep { $_ =~ /(^|\/)DBI/ } keys %INC) {
21 die "Wtf - DBI* modules present in %INC: @offenders";
22 }
23
24 local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /\bdeprecated\b/i };
562a1229 25 require( ( $_ =~ m| t/lib/ (.+) |x )[0] ); # untaint and strip lib-part (. is unavailable under -T)
79061be1 26 exit 0;
27 }
28
29 is ( waitpid($pid, 0), $pid, "Fork $pid terminated sucessfully");
30 my $ex = $? >> 8;
31 is ( $ex, 0, "Loading $_ ($pid) exitted with $ex" );
32 },
33
34 no_chdir => 1,
35}, 't/lib/DBICTest/Schema/');
36
37done_testing;