X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=tools%2Fprivoxy-regression-test.pl;h=986279e148a9908962a2bcd1bc8446f0d02af440;hb=08a611cffcf193cfde6cc3737f7eb48392dff872;hp=e83ce0eec93b3d29c89d8b13ac0d121c5c7b0ed7;hpb=93100605c7ba8a27206377e1f9c36564428bcb5a;p=privoxy.git diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index e83ce0ee..986279e1 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -7,7 +7,7 @@ # A regression test "framework" for Privoxy. For documentation see: # perldoc privoxy-regression-test.pl # -# $Id: privoxy-regression-test.pl,v 1.158 2008/07/23 18:47:11 fk Exp $ +# $Id: privoxy-regression-test.pl,v 1.161 2008/10/25 15:44:26 fk Exp $ # # Wish list: # @@ -155,9 +155,11 @@ sub load_regressions_tests () { our $privoxy_cgi_url; our @privoxy_config; + our %privoxy_features; my @actionfiles; my $curl_url = ''; my $file_number = 0; + my $feature; $curl_url .= $privoxy_cgi_url; $curl_url .= 'show-status'; @@ -176,6 +178,15 @@ sub load_regressions_tests () { my $directive = $1 . " " . $2; push (@privoxy_config, $directive); + + } elsif (m@([^<]*)@) { + + $feature = $1; + + } elsif (m@ (Yes|No) @) { + + $privoxy_features{$feature} = $1 if defined $feature; + $feature = undef; } } @@ -539,6 +550,8 @@ sub dependency_unsatisfied ($) { my $level = shift; our %dependencies; our @privoxy_config; + our %privoxy_features; + my $dependency_problem = 0; if (defined ($dependencies{$level}{'config line'})) { @@ -549,6 +562,20 @@ sub dependency_unsatisfied ($) { foreach (@privoxy_config) { $dependency_problem = 0 if (/$dependency/); + last; + } + + } elsif (defined ($dependencies{$level}{'feature status'})) { + + my $dependency = $dependencies{$level}{'feature status'}; + my ($feature, $status) = $dependency =~ /([^\s]*)\s+(Yes|No)/; + + $dependency_problem = 1; + + if (defined($privoxy_features{$feature}) + and ($privoxy_features{$feature} eq $status)) + { + $dependency_problem = 0; } } @@ -563,7 +590,12 @@ sub register_dependency ($$) { if ($dependency =~ /config line\s+(.*)/) { - $dependencies{$level}{'config line'} = $1; + $dependencies{$level}{'config line'} = $1; + + } elsif ($dependency =~ /feature status\s+(.*)/) { + + $dependencies{$level}{'feature status'} = $1; + } } @@ -1361,6 +1393,7 @@ Options and their default values if they have any: [--min-level $cli_options{'min-level'}] [--privoxy-address] [--retries $cli_options{'retries'}] + [--test-number] [--verbose] [--version] see "perldoc $0" for more information @@ -1485,7 +1518,8 @@ B [B<--debug bitmask>] [B<--forks> forks] [B<--fuzzer-feeding>] [B<--fuzzer-feeding>] [B<--help>] [B<--level level>] [B<--loops count>] [B<--max-level max-level>] [B<--max-time max-time>] [B<--min-level min-level>] B<--privoxy-address proxy-address> -[B<--retries retries>] [B<--verbose>] [B<--version>] +[B<--retries retries>] [B<--test-number test-number>] [B<--verbose>] +[B<--version>] =head1 DESCRIPTION @@ -1630,6 +1664,9 @@ syntax. B<--retries retries> Retry B times. +B<--test-number test-number> Only run the test with the specified +number. + B<--verbose> Also log succesful test runs. B<--version> Print version and exit.