diff options
author | mkanat%bugzilla.org <> | 2009-11-10 22:19:46 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-10 22:19:46 +0100 |
commit | 4b2c9f0f96242fcd5395c088de4e27bffbfb8085 (patch) | |
tree | 28f8d647697438d28cd38ec9aa901e04823c0ec5 /t/Support | |
parent | 2f804027b44c5790d4547f3161bff28266150bef (diff) | |
download | bugzilla-4b2c9f0f96242fcd5395c088de4e27bffbfb8085.tar.gz bugzilla-4b2c9f0f96242fcd5395c088de4e27bffbfb8085.tar.xz |
Bug 527505: Make 001compile.t use Bugzilla->feature to determine which modules to compile
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 't/Support')
-rw-r--r-- | t/Support/Files.pm | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/t/Support/Files.pm b/t/Support/Files.pm index 07f1c2f6c..d24cc2264 100644 --- a/t/Support/Files.pm +++ b/t/Support/Files.pm @@ -25,44 +25,14 @@ package Support::Files; use File::Find; -# exclude_deps is a hash of arrays listing the files to be excluded -# if a module is not available -# @additional_files = (); -%exclude_deps = ( - 'XML::Twig' => ['importxml.pl'], - 'Net::LDAP' => ['Bugzilla/Auth/Verify/LDAP.pm'], - 'Authen::Radius' => ['Bugzilla/Auth/Verify/RADIUS.pm'], - 'Email::Reply' => ['email_in.pl'], - 'Email::MIME::Attachment::Stripper' => ['email_in.pl'], - 'JSON::RPC' => ['Bugzilla/WebService/Server/JSONRPC.pm'] -); - @files = glob('*'); find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'Bugzilla'); -sub have_pkg { - my ($pkg) = @_; - my ($msg, $vnum, $vstr); - no strict 'refs'; - eval { my $p; ($p = $pkg . ".pm") =~ s!::!/!g; require $p; }; - return !($@); -} - -@exclude_files = (); -foreach $dep (keys(%exclude_deps)) { - if (!have_pkg($dep)) { - push @exclude_files, @{$exclude_deps{$dep}}; - } -} - sub isTestingFile { my ($file) = @_; my $exclude; - foreach $exclude (@exclude_files) { - if ($file eq $exclude) { return undef; } # get rid of excluded files. - } if ($file =~ /\.cgi$|\.pl$|\.pm$/) { return 1; |