aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-12-12 23:31:45 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-12-12 23:31:45 +0000
commit4b1350e467af1c5e4f18a6c3ce8b8f74a250114d (patch)
treefbff605d0888a23c26455852876760e2503ed93b /tests
parent22a0c57746ae12506b1ba0f0fafffd26c1907d6a (diff)
when failing to verify a HTTP server, display what curl said on stderr to
help debugging. (when using ipv6 I fell over this server that didn't have the ipv6 module loaded)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 2a03117e8..f66fdeef0 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -350,15 +350,19 @@ sub runhttpserver {
$pid = checkserver($pidfile);
# verify if our/any server is running on this port
- my $cmd = "$CURL -o log/verifiedserver -g \"http://$ip:$port/verifiedserver\" 2>/dev/null";
+ my $cmd = "$CURL -o log/verifiedserver -g \"http://$ip:$port/verifiedserver\" 2>log/verifystderr";
print "CMD; $cmd\n" if ($verbose);
my $res = system($cmd);
$res >>= 8; # rotate the result
my $data;
- print "RUN: curl command returned $res\n" if ($verbose);
-
+ if($res && $verbose) {
+ print "RUN: curl command returned $res\nRUN: ";
+ open(ERR, "<log/verifystderr");
+ print <ERR>;
+ close(ERR);
+ }
open(FILE, "<log/verifiedserver");
my @file=<FILE>;
close(FILE);