1 |
commit: 4b8f55f044b8f67a0b83d22940a927bd964257b1 |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 14 18:34:13 2017 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 14 18:34:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b8f55f0 |
7 |
|
8 |
dev-perl/Apache-Test: Restore & Fix tests |
9 |
|
10 |
- EAPI6 |
11 |
- Resurrected tests for the first time since 2004, please open a bug |
12 |
if there is actually a problem still |
13 |
- Expand tests to dummy-compile all modules, finding and fixing 3 bugs |
14 |
in the process. |
15 |
|
16 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
17 |
|
18 |
dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild | 94 ++++++++++++++++++++++ |
19 |
.../files/Apache-Test-1.400.0-catfile-import.patch | 26 ++++++ |
20 |
...Apache-Test-1.400.0-fix-missing-semicolon.patch | 26 ++++++ |
21 |
.../files/Apache-Test-1.400.0-phpclient.patch | 29 +++++++ |
22 |
4 files changed, 175 insertions(+) |
23 |
|
24 |
diff --git a/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild b/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..2c4a9339e93 |
27 |
--- /dev/null |
28 |
+++ b/dev-perl/Apache-Test/Apache-Test-1.400.0-r2.ebuild |
29 |
@@ -0,0 +1,94 @@ |
30 |
+# Copyright 1999-2017 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+DIST_AUTHOR=SHAY |
36 |
+DIST_VERSION=1.40 |
37 |
+inherit depend.apache perl-module |
38 |
+ |
39 |
+DESCRIPTION="Test.pm wrapper with helpers for testing Apache" |
40 |
+ |
41 |
+LICENSE="Apache-2.0" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
44 |
+IUSE="" |
45 |
+ |
46 |
+DEPEND="virtual/perl-ExtUtils-MakeMaker" |
47 |
+ |
48 |
+need_apache |
49 |
+ |
50 |
+PATCHES=( |
51 |
+ "${FILESDIR}/${P}-catfile-import.patch" |
52 |
+ "${FILESDIR}/${P}-fix-missing-semicolon.patch" |
53 |
+ "${FILESDIR}/${P}-phpclient.patch" |
54 |
+) |
55 |
+ |
56 |
+pkg_setup() { |
57 |
+ perl_set_version |
58 |
+} |
59 |
+ |
60 |
+src_install() { |
61 |
+ # This is to avoid conflicts with a deprecated Apache::Test stepping |
62 |
+ # in and causing problems/install errors |
63 |
+ if [ -f "${S}"/.mypacklist ]; |
64 |
+ then |
65 |
+ rm -f "${S}"/.mypacklist |
66 |
+ fi |
67 |
+ perl-module_src_install |
68 |
+} |
69 |
+# Parallel tests seem to be bad. |
70 |
+DIST_TEST="do" |
71 |
+src_test() { |
72 |
+ local MODULES=( |
73 |
+ "Apache::Test ${DIST_VERSION}" |
74 |
+ "Apache::Test5005compat 0.01" |
75 |
+ "Apache::TestBuild" |
76 |
+ "Apache::TestClient" |
77 |
+ "Apache::TestCommon" |
78 |
+ "Apache::TestCommonPost" |
79 |
+ "Apache::TestConfig" |
80 |
+ "Apache::TestConfigC" |
81 |
+ "Apache::TestConfigPHP" |
82 |
+ "Apache::TestConfigParrot" |
83 |
+ "Apache::TestConfigParse" |
84 |
+ "Apache::TestConfigPerl" |
85 |
+ "Apache::TestHandler" |
86 |
+ "Apache::TestHarness" |
87 |
+ "Apache::TestHarnessPHP" |
88 |
+ "Apache::TestMB" |
89 |
+ "Apache::TestMM" |
90 |
+ "Apache::TestPerlDB" |
91 |
+ "Apache::TestReport" |
92 |
+ "Apache::TestReportPerl" |
93 |
+ "Apache::TestRequest" |
94 |
+ "Apache::TestRun" |
95 |
+ "Apache::TestRunPHP 1.00" |
96 |
+ "Apache::TestRunParrot 1.00" |
97 |
+ "Apache::TestRunPerl 1.00" |
98 |
+ "Apache::TestSSLCA" |
99 |
+ "Apache::TestServer" |
100 |
+ "Apache::TestSmoke" |
101 |
+ "Apache::TestSmokePerl" |
102 |
+ "Apache::TestSort" |
103 |
+ "Apache::TestTrace 0.01" |
104 |
+ "Apache::TestUtil 0.02" |
105 |
+ "Bundle::ApacheTest ${DISTVERSION}" |
106 |
+ ) |
107 |
+ local failed=() |
108 |
+ for dep in "${MODULES[@]}"; do |
109 |
+ ebegin "Compile testing ${dep}" |
110 |
+ perl -Mblib="${S}" -M"${dep} ()" -e1 |
111 |
+ eend $? || failed+=( "$dep" ) |
112 |
+ done |
113 |
+ if [[ ${failed[@]} ]]; then |
114 |
+ echo |
115 |
+ eerror "One or more modules failed compile:"; |
116 |
+ for dep in "${failed[@]}"; do |
117 |
+ eerror " ${dep}" |
118 |
+ done |
119 |
+ die "Failing due to module compilation errors"; |
120 |
+ fi |
121 |
+ perl_rm_files t/more/02testmore.t t/more/04testmore.t |
122 |
+ perl-module_src_test |
123 |
+} |
124 |
|
125 |
diff --git a/dev-perl/Apache-Test/files/Apache-Test-1.400.0-catfile-import.patch b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-catfile-import.patch |
126 |
new file mode 100644 |
127 |
index 00000000000..8bd6dbfddf6 |
128 |
--- /dev/null |
129 |
+++ b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-catfile-import.patch |
130 |
@@ -0,0 +1,26 @@ |
131 |
+From f06bb625c7feb44bf9b5c13617522ce57cdad84e Mon Sep 17 00:00:00 2001 |
132 |
+From: Kent Fredric <kentnl@g.o> |
133 |
+Date: Sun, 15 Oct 2017 06:16:45 +1300 |
134 |
+Subject: Fix missing import of "catfile" |
135 |
+ |
136 |
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123283 |
137 |
+--- |
138 |
+ lib/Apache/TestConfigParse.pm | 2 +- |
139 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
140 |
+ |
141 |
+diff --git a/lib/Apache/TestConfigParse.pm b/lib/Apache/TestConfigParse.pm |
142 |
+index 88a19af..8fe0fe4 100644 |
143 |
+--- a/lib/Apache/TestConfigParse.pm |
144 |
++++ b/lib/Apache/TestConfigParse.pm |
145 |
+@@ -23,7 +23,7 @@ use warnings FATAL => 'all'; |
146 |
+ |
147 |
+ use Apache::TestTrace; |
148 |
+ |
149 |
+-use File::Spec::Functions qw(rel2abs splitdir file_name_is_absolute); |
150 |
++use File::Spec::Functions qw(rel2abs splitdir file_name_is_absolute catfile); |
151 |
+ use File::Basename qw(dirname basename); |
152 |
+ |
153 |
+ sub strip_quotes { |
154 |
+-- |
155 |
+2.14.2 |
156 |
+ |
157 |
|
158 |
diff --git a/dev-perl/Apache-Test/files/Apache-Test-1.400.0-fix-missing-semicolon.patch b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-fix-missing-semicolon.patch |
159 |
new file mode 100644 |
160 |
index 00000000000..f09cd53348f |
161 |
--- /dev/null |
162 |
+++ b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-fix-missing-semicolon.patch |
163 |
@@ -0,0 +1,26 @@ |
164 |
+From b2a2cdc1e9a3121ea8848ab4a2410c5dcc68d620 Mon Sep 17 00:00:00 2001 |
165 |
+From: Kent Fredric <kentnl@g.o> |
166 |
+Date: Sun, 15 Oct 2017 06:15:47 +1300 |
167 |
+Subject: Fix missing ";" |
168 |
+ |
169 |
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123282 |
170 |
+--- |
171 |
+ lib/Apache/TestConfigPHP.pm | 2 +- |
172 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
173 |
+ |
174 |
+diff --git a/lib/Apache/TestConfigPHP.pm b/lib/Apache/TestConfigPHP.pm |
175 |
+index 0ddea0b..1c79865 100644 |
176 |
+--- a/lib/Apache/TestConfigPHP.pm |
177 |
++++ b/lib/Apache/TestConfigPHP.pm |
178 |
+@@ -170,7 +170,7 @@ sub configure_php_ini { |
179 |
+ my $dir = catfile $self->{vars}->{serverroot}, 'conf'; |
180 |
+ my $file = catfile $dir, 'php.ini'; |
181 |
+ |
182 |
+- return if -e $file |
183 |
++ return if -e $file; |
184 |
+ |
185 |
+ my $log = catfile $self->{vars}->{t_logs}, 'error_log'; |
186 |
+ |
187 |
+-- |
188 |
+2.14.2 |
189 |
+ |
190 |
|
191 |
diff --git a/dev-perl/Apache-Test/files/Apache-Test-1.400.0-phpclient.patch b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-phpclient.patch |
192 |
new file mode 100644 |
193 |
index 00000000000..cecf7de1085 |
194 |
--- /dev/null |
195 |
+++ b/dev-perl/Apache-Test/files/Apache-Test-1.400.0-phpclient.patch |
196 |
@@ -0,0 +1,29 @@ |
197 |
+From 2dbb0fcab02ea60c0ca5e6ab4150691ffcfb8d7c Mon Sep 17 00:00:00 2001 |
198 |
+From: Kent Fredric <kentnl@g.o> |
199 |
+Date: Sun, 15 Oct 2017 06:47:45 +1300 |
200 |
+Subject: Don't die at load time due to undeclared '$phpclient' |
201 |
+ |
202 |
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123284 |
203 |
+--- |
204 |
+ lib/Apache/TestHarnessPHP.pm | 5 ----- |
205 |
+ 1 file changed, 5 deletions(-) |
206 |
+ |
207 |
+diff --git a/lib/Apache/TestHarnessPHP.pm b/lib/Apache/TestHarnessPHP.pm |
208 |
+index 90fdedc..806ba6f 100644 |
209 |
+--- a/lib/Apache/TestHarnessPHP.pm |
210 |
++++ b/lib/Apache/TestHarnessPHP.pm |
211 |
+@@ -90,11 +90,6 @@ sub get_tests { |
212 |
+ 'make sure php is in your PATH'); |
213 |
+ @tests = grep { not /\.php$/ } @tests; |
214 |
+ } |
215 |
+- elsif (! $phpclient) { |
216 |
+- warning(join ' - ', 'skipping *.php tests', |
217 |
+- 'Test::Harness 2.38 not available'); |
218 |
+- @tests = grep { not /\.php$/ } @tests; |
219 |
+- } |
220 |
+ |
221 |
+ return @tests; |
222 |
+ } |
223 |
+-- |
224 |
+2.14.2 |
225 |
+ |