Revision 630048eb
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
t/001compile.t | ||
---|---|---|
27 | 27 |
use strict; |
28 | 28 |
|
29 | 29 |
use lib 't'; |
30 |
use lib '../modules/override'; |
|
31 |
use lib '../modules/fallback'; |
|
32 | 30 |
|
33 | 31 |
use Support::Files; |
34 | 32 |
|
35 | 33 |
use Test::More tests => scalar(@Support::Files::testitems); |
36 | 34 |
|
37 | 35 |
# Need this to get the available driver information |
38 |
use DBI; |
|
39 |
my @DBI_drivers = DBI->available_drivers; |
|
36 |
#use DBI;
|
|
37 |
#my @DBI_drivers = DBI->available_drivers;
|
|
40 | 38 |
|
41 | 39 |
# Bugzilla requires Perl 5.8.0 now. Checksetup will tell you this if you run it, but |
42 | 40 |
# it tests it in a polite/passive way that won't make it fail at compile time. We'll |
... | ... | |
67 | 65 |
$file =~ s/\s.*$//; # nuke everything after the first space (#comment) |
68 | 66 |
next if (!$file); # skip null entries |
69 | 67 |
|
70 |
# Skip mod_perl.pl in all cases. It doesn't compile correctly from the command line. |
|
71 |
if ($file eq 'mod_perl.pl') { |
|
72 |
ok(1, "Skipping mod_perl.pl"); |
|
73 |
next; |
|
74 |
} |
|
75 |
|
|
76 |
# Check that we have a DBI module to support the DB, if this is a database |
|
77 |
# module (but not Schema) |
|
78 |
if ($file =~ m#Bugzilla/DB/([^/]+)\.pm$# && $file ne "Bugzilla/DB/Schema.pm") { |
|
79 |
if (!grep(lc($_) =~ /$1/i, @DBI_drivers)) { |
|
80 |
ok(1,$file." - Skipping, as the DBD module not installed"); |
|
81 |
next; |
|
82 |
} |
|
83 |
} |
|
84 |
|
|
85 | 68 |
open (FILE,$file); |
86 | 69 |
my $bang = <FILE>; |
87 | 70 |
close (FILE); |
t/Support/Files.pm | ||
---|---|---|
39 | 39 |
|
40 | 40 |
@files = glob('*'); |
41 | 41 |
find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'SL'); |
42 |
find(sub { push(@files, $File::Find::name) if $_ =~ /\.pl$/;}, 'bin/mozilla'); |
|
42 | 43 |
|
43 | 44 |
sub have_pkg { |
44 | 45 |
my ($pkg) = @_; |
Auch abrufbar als: Unified diff
Support::Files auf bin/mozilla angepasst und Bugzillaspezifische Tests entfernt.