runtests.pl: Optimised feature present checking code

...to exclude not present features.
This commit is contained in:
Steve Holme 2013-12-28 11:31:43 +00:00
parent 147b2a546e
commit 28dd47d4d4

View File

@ -2751,124 +2751,127 @@ sub singletest {
my $f = $_; my $f = $_;
$f =~ s/\s//g; $f =~ s/\s//g;
$feature{$f} = $f; if($f =~ /^[^!](.*)$/) {
# Store the feature for later
$feature{$1} = $1;
if($f eq "SSL") { if($1 eq "SSL") {
if($ssl_version) { if($ssl_version) {
next; next;
} }
} }
elsif($f eq "OpenSSL") { elsif($1 eq "OpenSSL") {
if($has_openssl) { if($has_openssl) {
next; next;
} }
} }
elsif($f eq "GnuTLS") { elsif($1 eq "GnuTLS") {
if($has_gnutls) { if($has_gnutls) {
next; next;
} }
} }
elsif($f eq "NSS") { elsif($1 eq "NSS") {
if($has_nss) { if($has_nss) {
next; next;
} }
} }
elsif($f eq "axTLS") { elsif($1 eq "axTLS") {
if($has_axtls) { if($has_axtls) {
next; next;
} }
} }
elsif($f eq "WinSSL") { elsif($1 eq "WinSSL") {
if($has_winssl) { if($has_winssl) {
next; next;
} }
} }
elsif($f eq "DarwinSSL") { elsif($1 eq "DarwinSSL") {
if($has_darwinssl) { if($has_darwinssl) {
next; next;
} }
} }
elsif($f eq "unittest") { elsif($1 eq "unittest") {
if($debug_build) { if($debug_build) {
next; next;
} }
} }
elsif($f eq "debug") { elsif($1 eq "debug") {
if($debug_build) { if($debug_build) {
next; next;
} }
} }
elsif($f eq "TrackMemory") { elsif($1 eq "TrackMemory") {
if($has_memory_tracking) { if($has_memory_tracking) {
next; next;
} }
} }
elsif($f eq "large_file") { elsif($1 eq "large_file") {
if($large_file) { if($large_file) {
next; next;
} }
} }
elsif($f eq "idn") { elsif($1 eq "idn") {
if($has_idn) { if($has_idn) {
next; next;
} }
} }
elsif($f eq "ipv6") { elsif($1 eq "ipv6") {
if($has_ipv6) { if($has_ipv6) {
next; next;
} }
} }
elsif($f eq "libz") { elsif($1 eq "libz") {
if($has_libz) { if($has_libz) {
next; next;
} }
} }
elsif($f eq "NTLM") { elsif($1 eq "NTLM") {
if($has_ntlm) { if($has_ntlm) {
next; next;
} }
} }
elsif($f eq "NTLM_WB") { elsif($1 eq "NTLM_WB") {
if($has_ntlm_wb) { if($has_ntlm_wb) {
next; next;
} }
} }
elsif($f eq "SSPI") { elsif($1 eq "SSPI") {
if($has_sspi) { if($has_sspi) {
next; next;
} }
} }
elsif($f eq "getrlimit") { elsif($1 eq "getrlimit") {
if($has_getrlimit) { if($has_getrlimit) {
next; next;
} }
} }
elsif($f eq "crypto") { elsif($1 eq "crypto") {
if($has_crypto) { if($has_crypto) {
next; next;
} }
} }
elsif($f eq "TLS-SRP") { elsif($1 eq "TLS-SRP") {
if($has_tls_srp) { if($has_tls_srp) {
next; next;
} }
} }
elsif($f eq "Metalink") { elsif($1 eq "Metalink") {
if($has_metalink) { if($has_metalink) {
next; next;
} }
} }
elsif($f eq "socks") { elsif($1 eq "socks") {
next; next;
} }
# See if this "feature" is in the list of supported protocols # See if this "feature" is in the list of supported protocols
elsif (grep /^\Q$f\E$/i, @protocols) { elsif (grep /^\Q$1\E$/i, @protocols) {
next; next;
} }
$why = "curl lacks $f support"; $why = "curl lacks $1 support";
last; last;
} }
}
# We require a feature to not be present # We require a feature to not be present
if(!$why) { if(!$why) {