diff options
-rw-r--r-- | tests/FILEFORMAT | 1 | ||||
-rw-r--r-- | tests/data/test130 | 5 | ||||
-rw-r--r-- | tests/data/test131 | 5 | ||||
-rw-r--r-- | tests/data/test132 | 5 | ||||
-rw-r--r-- | tests/data/test133 | 5 | ||||
-rw-r--r-- | tests/data/test134 | 5 | ||||
-rwxr-xr-x | tests/runtests.pl | 69 |
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]) { |