You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@apache.org on 2018/03/05 02:11:33 UTC

svn commit: r1825842 - /httpd/test/framework/trunk/t/ab/base.t

Author: druggeri
Date: Mon Mar  5 02:11:33 2018
New Revision: 1825842

URL: http://svn.apache.org/viewvc?rev=1825842&view=rev
Log:
Support cases when mod_ssl is not built

Modified:
    httpd/test/framework/trunk/t/ab/base.t

Modified: httpd/test/framework/trunk/t/ab/base.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/ab/base.t?rev=1825842&r1=1825841&r2=1825842&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/ab/base.t (original)
+++ httpd/test/framework/trunk/t/ab/base.t Mon Mar  5 02:11:33 2018
@@ -4,8 +4,9 @@ use warnings FATAL => 'all';
 use Apache::Test;
 use Apache::TestConfig;
 use IPC::Open3;
+my $vars = Apache::Test::vars();
 
-plan tests => 5;
+plan tests => ($vars->{ssl_module_name} ? 5 : 2);
 
 sub run_and_gather_output {
     my $command = shift;
@@ -18,21 +19,20 @@ sub run_and_gather_output {
     return { status => $status, stdout => \@cstdout, stderr => \@cstderr };
 }
 
-my $http_url = Apache::TestRequest::module2url("core", {scheme => 'http', path => '/'});
-my $https_url = Apache::TestRequest::module2url("mod_ssl", {scheme => 'https', path => '/'});
-
 my $cfg = Apache::TestConfig->new(());
 my $ab_path = "$cfg->{httpd_basedir}" . "/bin/ab";
 
-
+my $http_url = Apache::TestRequest::module2url("core", {scheme => 'http', path => '/'});
 my $http_results = run_and_gather_output("$ab_path -q -n 10 $http_url");
 ok ($http_results->{status} == 0);
 ok (scalar(@{$http_results->{stderr}}) == 0);
 
+if ($vars->{ssl_module_name}) {
+    my $https_url = Apache::TestRequest::module2url($vars->{ssl_module_name}, {scheme => 'https', path => '/'});
+    my $https_results = run_and_gather_output("$ab_path -q -n 10 $https_url");
+    ok ($https_results->{status} == 0);
+    ok (scalar(@{$https_results->{stderr}}) == 0);
 
-my $https_results = run_and_gather_output("$ab_path -q -n 10 $https_url");
-ok ($https_results->{status} == 0);
-ok (scalar(@{$https_results->{stderr}}) == 0);
-
-#XXX: For some reason, stderr is getting pushed into stdout. This test will at least catch known SSL failures
-ok (scalar(grep(/SSL.*(fail|err)/i, @{$https_results->{stdout}}) == 0) );
+    #XXX: For some reason, stderr is getting pushed into stdout. This test will at least catch known SSL failures
+    ok (scalar(grep(/SSL.*(fail|err)/i, @{$https_results->{stdout}}) == 0) );
+}