Codebase list libdbix-class-perl / d8541ca
This is an expensive author-only test, move to xt/ Also get xt tests first in line (won't matter much with -s) Peter Rabbitson 10 years ago
4 changed file(s) with 40 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
1111 my @xt_tests = map { File::Spec->catfile($_, '*.t') } sort keys %$xt_dirs;
1212
1313 # this will add the xt tests to the `make test` target among other things
14 Meta->tests(join (' ', map { $_ || () } Meta->tests, @xt_tests ) );
14 Meta->tests(join (' ', map { $_ || () } @xt_tests, Meta->tests ) );
1515
1616 # inject an explicit xt test run, mainly to check the contents of
1717 # lib and the generated POD's *before* anything is copied around
1313 run_or_err "Prepare blib" "make pure_all"
1414 run_harness_tests
1515 else
16 PROVECMD="prove -lrswj$NUMTHREADS t xt"
16 PROVECMD="prove -lrswj$NUMTHREADS xt t"
1717
1818 # FIXME - temporary, until Package::Stash is fixed
1919 if perl -M5.010 -e 1 &>/dev/null ; then
+0
-38
t/02_standalone_test_classes.t less more
0 use warnings;
1 use strict;
2
3 use Test::More;
4 use File::Find;
5
6 use DBIx::Class::_Util 'sigwarn_silencer';
7
8 use lib 't/lib';
9
10 find({
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 { $_ ne 'DBIx/Class/_Util.pm' } grep { $_ =~ /(^|\/)DBI/ } keys %INC) {
21 die "Wtf - DBI* modules present in %INC: @offenders";
22 }
23
24 local $SIG{__WARN__} = sigwarn_silencer( qr/\bdeprecated\b/i );
25 require( ( $_ =~ m| t/lib/ (.+) |x )[0] ); # untaint and strip lib-part (. is unavailable under -T)
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
37 done_testing;
0 use warnings;
1 use strict;
2
3 use Test::More;
4 use File::Find;
5
6 use DBIx::Class::_Util 'sigwarn_silencer';
7
8 use lib 't/lib';
9
10 find({
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 { $_ ne 'DBIx/Class/_Util.pm' } grep { $_ =~ /(^|\/)DBI/ } keys %INC) {
21 die "Wtf - DBI* modules present in %INC: @offenders";
22 }
23
24 local $SIG{__WARN__} = sigwarn_silencer( qr/\bdeprecated\b/i );
25 require( ( $_ =~ m| t/lib/ (.+) |x )[0] ); # untaint and strip lib-part (. is unavailable under -T)
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
37 done_testing;