From 14bcdce1dc6029c3676c3640d8148c83c14692e5 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 12 Sep 2016 16:22:17 -0400 Subject: Revert "Bug 1283930 - Add Makefile.PL & local/lib/perl5 support to bmo/master + local symlink to data/ directory" This reverts commit e6bf4cacb10f86077fe898349485f5c7ab9fb4b6. --- t/Support/Files.pm | 61 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 't/Support/Files.pm') diff --git a/t/Support/Files.pm b/t/Support/Files.pm index 1bdf2eac7..00e0efd34 100644 --- a/t/Support/Files.pm +++ b/t/Support/Files.pm @@ -1,40 +1,45 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton +# Joel Peshkin package Support::Files; -use 5.10.1; -use strict; -use warnings; +use Bugzilla; use File::Find; -our @additional_files = (); - use constant IGNORE => qw( Bugzilla/DuoAPI.pm Bugzilla/DuoWeb.pm ); -our @files = glob('*'); -find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, qw(Bugzilla docs)); -push(@files, 'extensions/create.pl', 'docs/makedocs.pl', 'cpanfile'); - -our @extensions = - grep { $_ ne 'extensions/create.pl' && ! -e "$_/disabled" } - glob('extensions/*'); - -foreach my $extension (@extensions) { - find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, $extension); -} +@additional_files = (); -our @test_files = glob('t/*.t xt/*/*.t'); +@files = glob('*'); +my @extension_paths = map { $_->package_dir } @{ Bugzilla->extensions }; +find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'Bugzilla', @extension_paths); +push(@files, 'extensions/create.pl'); +my @extensions = glob('extensions/*'); foreach my $extension (@extensions) { # Skip disabled extensions next if -e "$extension/disabled"; @@ -50,7 +55,7 @@ sub isTestingFile { return undef if $ignore eq $file; } - if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) { + if ($file =~ /\.cgi$|\.pl$|\.pm$/) { return 1; } my $additional; @@ -60,13 +65,11 @@ sub isTestingFile { return undef; } -our (@testitems, @module_files); - -foreach my $currentfile (@files) { +foreach $currentfile (@files) { if (isTestingFile($currentfile)) { - push(@testitems, $currentfile); + push(@testitems,$currentfile); } - push(@module_files, $currentfile) if $currentfile =~ /\.pm$/; } + 1; -- cgit v1.2.3-24-g4f1b