aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-06-12 16:38:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-06-12 16:38:14 +0000
commit654e3f110175c737c09beae047eb52a8075841d6 (patch)
treef61a86ca53127f2aeb6f632bd44f8d2e9d18b256
parent86689dc524a3a141e946abe704632b813b22618f (diff)
require the netrc_debug feature the same way we now can require SSL
present client-side
-rw-r--r--tests/FILEFORMAT1
-rw-r--r--tests/data/test1305
-rw-r--r--tests/data/test1315
-rw-r--r--tests/data/test1325
-rw-r--r--tests/data/test1335
-rw-r--r--tests/data/test1345
-rwxr-xr-xtests/runtests.pl69
7 files changed, 44 insertions, 51 deletions
diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT
index 7c8a96ad9..3098fba78 100644
--- a/tests/FILEFORMAT
+++ b/tests/FILEFORMAT
@@ -62,6 +62,7 @@ case number.
A list of features that must be present in the client/library for this test
to be able to run. Features testable here are:
SSL
+netrc_debug
</features>
<killserver>
diff --git a/tests/data/test130 b/tests/data/test130
index 86a422564..5441f1c35 100644
--- a/tests/data/test130
+++ b/tests/data/test130
@@ -18,7 +18,10 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
-<client requires=netrc_debug>
+<client>
+<features>
+netrc_debug
+</features>
<server>
ftp
</server>
diff --git a/tests/data/test131 b/tests/data/test131
index e1a8de78f..767fc2c84 100644
--- a/tests/data/test131
+++ b/tests/data/test131
@@ -18,7 +18,10 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
-<client requires=netrc_debug>
+<client>
+<features>
+netrc_debug
+</features>
<server>
ftp
</server>
diff --git a/tests/data/test132 b/tests/data/test132
index 4d1f10b43..1d5cf5385 100644
--- a/tests/data/test132
+++ b/tests/data/test132
@@ -18,7 +18,10 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
-<client requires=netrc_debug>
+<client>
+<features>
+netrc_debug
+</features>
<server>
ftp
</server>
diff --git a/tests/data/test133 b/tests/data/test133
index d30a6d5a1..f05dd1f29 100644
--- a/tests/data/test133
+++ b/tests/data/test133
@@ -18,7 +18,10 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
-<client requires=netrc_debug>
+<client>
+<features>
+netrc_debug
+</features>
<server>
ftp
</server>
diff --git a/tests/data/test134 b/tests/data/test134
index 258a4f3a9..ae5564bc7 100644
--- a/tests/data/test134
+++ b/tests/data/test134
@@ -18,7 +18,10 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
#
# Client-side
-<client requires=netrc_debug>
+<client>
+<features>
+netrc_debug
+</features>
<server>
ftp
</server>
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 5c7e4ab08..db3c3083f 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -52,9 +52,7 @@ my $perl="perl -I$srcdir";
my $memory_debug=0;
# this gets set if curl is compiled with netrc debugging:
-# It has to be in the global symbol table because of the way 'requires' works
-$main::netrc_debug=0;
-my $netrc_debug = \$main::netrc_debug;
+my $netrc_debug = 0;
# name of the file that the memory debugging creates:
my $memdump="memdump";
@@ -465,11 +463,11 @@ sub displaydata {
# there's only one debug control in the configure script
# so hope netrc debugging is enabled and set it up
- $$netrc_debug = 1;
+ $netrc_debug = 1;
$ENV{'CURL_DEBUG_NETRC'} = 'log/netrc';
}
printf("* Memory debugging: %s\n", $memory_debug?"ON":"OFF");
- printf("* Netrc debugging: %s\n", $$netrc_debug?"ON":"OFF");
+ printf("* Netrc debugging: %s\n", $netrc_debug?"ON":"OFF");
printf("* HTTPS server: %s\n", $checkstunnel?"ON":"OFF");
printf("* FTPS server: %s\n", $checkstunnel?"ON":"OFF");
printf("* libcurl SSL: %s\n", $ssl_version?"ON":"OFF");
@@ -507,6 +505,26 @@ sub singletest {
return -1;
}
+ my @what = getpart("client", "features");
+ for(@what) {
+ my $f = $_;
+ $f =~ s/\s//g;
+
+ if($f eq "SSL") {
+ if($ssl_version) {
+ next;
+ }
+ }
+ elsif($f eq "netrc_debug") {
+ if($netrc_debug) {
+ next;
+ }
+ }
+
+ warn "Test case $testnum requires the missing feature: $_";
+ return -1;
+ }
+
my $serverproblem = serverfortest($testnum);
if($serverproblem) {
@@ -522,27 +540,6 @@ sub singletest {
return -1;
}
- {
- my %hash = getpartattr("client");
- my $requires = $hash{'requires'};
-
- if (defined($requires)) {
- no strict "refs";
- my $value=${$requires};
-# print "This test requires '$requires' with value '$value' \n";
-
- if (${$requires}) {
- # this test is OK
- ;
- }else {
- print "$testnum requires $requires, which is not set; skipping\n";
- $skipped++;
- return -1; # return test-not-run
- }
- }
- }
-
-
# extract the reply data
my @reply = getpart("reply", "data");
my @replycheck = getpart("reply", "datacheck");
@@ -931,26 +928,6 @@ sub serverfortest {
return 100;
}
- my @what = getpart("client", "features");
-
- for(@what) {
- my $f = $_;
-
- $f =~ s/\s//g;
-
- print STDERR "CHECK FOR $f\n";
-
- if($f eq "SSL") {
- if($ssl_version) {
- last;
- }
- }
-
- warn "Test case $testnum requires the missing feature: $_";
- return 100;
- }
-
-
my @what = getpart("client", "server");
if(!$what[0]) {