[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-test-cvs
Subject: cvs commit: httpd-test/perl-framework/Apache-Test Changes
From: stas () apache ! org
Date: 2003-09-17 19:06:31
[Download RAW message or body]
stas 2003/09/17 12:06:31
Modified: perl-framework/Apache-Test/lib/Apache TestRequest.pm
perl-framework/Apache-Test Changes
Log:
if env var APACHE_TEST_PRETEND_NO_LWP is true, Apache::Test will
pretend that LWP is not available. useful for testing whether the test
suite will survive on a system which doesn't have libwww-perl
installed.
Revision Changes Path
1.86 +35 -11 httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
Index: TestRequest.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -u -r1.85 -r1.86
--- TestRequest.pm 13 Aug 2003 22:14:23 -0000 1.85
+++ TestRequest.pm 17 Sep 2003 19:06:30 -0000 1.86
@@ -14,17 +14,24 @@
use constant INTERP_KEY => 'X-PerlInterpreter';
use constant UA_TIMEOUT => 60 * 10; #longer timeout for debugging
-my $have_lwp = eval {
- require LWP::UserAgent;
- require HTTP::Request::Common;
-
- unless (defined &HTTP::Request::Common::OPTIONS) {
- package HTTP::Request::Common;
- no strict 'vars';
- *OPTIONS = sub { _simple_req(OPTIONS => @_) };
- push @EXPORT, 'OPTIONS';
- }
-};
+my $have_lwp = 0;
+
+# APACHE_TEST_PRETEND_NO_LWP=1 pretends that LWP is not available so
+# one can test whether the test suite survives if the user doesn't
+# have lwp installed
+unless ($ENV{APACHE_TEST_PRETEND_NO_LWP}) {
+ $have_lwp = eval {
+ require LWP::UserAgent;
+ require HTTP::Request::Common;
+
+ unless (defined &HTTP::Request::Common::OPTIONS) {
+ package HTTP::Request::Common;
+ no strict 'vars';
+ *OPTIONS = sub { _simple_req(OPTIONS => @_) };
+ push @EXPORT, 'OPTIONS';
+ }
+ };
+}
unless ($have_lwp) {
require Apache::TestClient;
@@ -979,6 +986,23 @@
testing what options the Apache server supports. Consult the HTTPD 1.1
specification, section 9.2, at
I<http://www.faqs.org/rfcs/rfc2616.html> for more information.
+
+=back
+
+
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables can affect the behavior of
+C<Apache::TestRequest>:
+
+=over
+
+=item APACHE_TEST_PRETEND_NO_LWP
+
+If the environment variable C<APACHE_TEST_PRETEND_NO_LWP> is set to a
+true value, C<Apache::TestRequest> will pretend that LWP is not
+available so one can test whether the test suite will survive on a
+system which doesn't have libwww-perl installed.
=back
1.43 +5 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -u -r1.42 -r1.43
--- Changes 12 Sep 2003 02:37:41 -0000 1.42
+++ Changes 17 Sep 2003 19:06:31 -0000 1.43
@@ -8,6 +8,11 @@
=item 1.04-dev -
+if env var APACHE_TEST_PRETEND_NO_LWP is true, Apache::Test will
+pretend that LWP is not available. useful for testing whether the test
+suite will survive on a system which doesn't have libwww-perl
+installed. [Stas]
+
Apache::TestSmoke provides a new mode: -bug_mode, which runs an
equivalent of plain 't/TEST' but generates a lot of useful debug
information, in addition to matching the core files to the tests that
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic