On Monday 12 October 2015 01:34:35 christian fafard wrote:
> I'm not sure if this is what you were expecting.
> The other tests i've checked does not write in the log file directly like
> that,but i don't understand the test framework completely and haven't found
> how to do otherwise. The "cpanm IO::Socket::SSL" command line that is
> suggested is supposed to be the easiest wayto install that module once you
> have cpanminus installed, but i must admit it doesn't work for me.I get an
> "out of memory" failure that i have to work on. And i'm sorry for the git
> diff, i'll start using git soon.
> Regards, Christian

Hi Christian,

you just have to print out to STDERR. During the test run via 'make check', 
STDERR is redirected to the correct log file.

I amended your patch and generated the attached file with 'git format-patch 
-1'. Please have a look into it and if if that is ok for you, I am going to 
push it.

Regards, Tim

>From b8ee3705713f53352966630c85d06f491c03c480 Mon Sep 17 00:00:00 2001
From: christian fafard <[email protected]>
Date: Mon, 12 Oct 2015 09:50:18 +0200
Subject: [PATCH] Skip HTTPS perl tests if IO::Socket::SSL not installed

* tests/Test-proxied-https-auth-keepalive.px: Skip test if perl module
  IO::Socket::SSL is not installed (trivial change).
* tests/Test-proxied-https-auth.px: Skip test if perl module
  IO::Socket::SSL is not installed (trivial change).
---
 tests/Test-proxied-https-auth-keepalive.px | 9 ++++++++-
 tests/Test-proxied-https-auth.px           | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px
index e407f31..929a31c 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 1daefe8..ce6d7ff 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!!!";
-- 
2.6.1

Reply via email to