diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px index e407f315..929a31ce 100755 --- a/tests/Test-proxied-https-auth-keepalive.px +++ b/tests/Test-proxied-https-auth-keepalive.px @@ -29,7 +29,14 @@ if (defined $srcdir) { use HTTP::Daemon; use HTTP::Request; -use IO::Socket::SSL; +# Skip this test rather than fail it when the module isn't installed +if (!eval {require IO::Socket::SSL;1;}) { + print STDERR "This test needs the perl module \"IO::Socket::SSL\".\n"; + print STDERR "Install e.g. on Debian with 'apt-get install libio-socket-ssl-perl'\n"; + print STDERR " or if using cpanminus 'cpanm IO::Socket::SSL' could be used to install it.\n"; + exit 77; # skip +} +IO::Socket::SSL->import(); my $SOCKET = HTTP::Daemon->new (LocalAddr => 'localhost', ReuseAddr => 1) or die "Cannot create server!!!"; diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px index 1daefe83..ce6d7ffe 100755 --- a/tests/Test-proxied-https-auth.px +++ b/tests/Test-proxied-https-auth.px @@ -29,7 +29,14 @@ if (defined $srcdir) { use HTTP::Daemon; use HTTP::Request; -use IO::Socket::SSL; +# Skip this test rather than fail it when the module isn't installed +if (!eval {require IO::Socket::SSL;1;}) { + print STDERR "This test needs the perl module \"IO::Socket::SSL\".\n"; + print STDERR "Install e.g. on Debian with 'apt-get install libio-socket-ssl-perl'\n"; + print STDERR " or if using cpanminus 'cpanm IO::Socket::SSL' could be used to install it.\n"; + exit 77; # skip +} +IO::Socket::SSL->import(); my $SOCKET = HTTP::Daemon->new (LocalAddr => 'localhost', ReuseAddr => 1) or die "Cannot create server!!!";