projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
18818d6
)
Factor get_skip_reason() out of execute_regression_tests().
author
Fabian Keil
<fk@fabiankeil.de>
Mon, 1 Jun 2009 13:22:56 +0000
(13:22 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Mon, 1 Jun 2009 13:22:56 +0000
(13:22 +0000)
tools/privoxy-regression-test.pl
patch
|
blob
|
history
diff --git
a/tools/privoxy-regression-test.pl
b/tools/privoxy-regression-test.pl
index
0668df7
..
b51a165
100755
(executable)
--- 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
#
# A regression test "framework" for Privoxy. For documentation see:
# perldoc privoxy-regression-test.pl
#
-# $Id: privoxy-regression-test.pl,v 1.
44 2009/06/01 10:49:07 fabiankeil
Exp $
+# $Id: privoxy-regression-test.pl,v 1.
182 2009/06/01 13:21:48 fk
Exp $
#
# Wish list:
#
#
# Wish list:
#
@@
-492,21
+492,7
@@
sub execute_regression_tests () {
die "Regression test id mismatch" if ($r != $regression_tests[$s][$r]{'regression-test-id'});
my $number = $regression_tests[$s][$r]{'number'};
die "Regression test id mismatch" if ($r != $regression_tests[$s][$r]{'regression-test-id'});
my $number = $regression_tests[$s][$r]{'number'};
- my $skip_reason = undef;
-
- if ($regression_tests[$s][$r]{'ignore'}) {
-
- $skip_reason = "Ignore flag is set";
-
- } elsif (cli_option_is_set('test-number')
- and get_cli_option('test-number') != $number) {
-
- $skip_reason = "Only executing test " . get_cli_option('test-number');
-
- } else {
-
- $skip_reason = level_is_unacceptable($regression_tests[$s][$r]{'level'});
- }
+ my $skip_reason = get_skip_reason($regression_tests[$s][$r]);
if (defined $skip_reason) {
if (defined $skip_reason) {
@@
-543,6
+529,27
@@
sub execute_regression_tests () {
}
}
}
}
+sub get_skip_reason ($) {
+ my $test = shift;
+ my $skip_reason = undef;
+
+ if ($test->{'ignore'}) {
+
+ $skip_reason = "Ignore flag is set";
+
+ } elsif (cli_option_is_set('test-number') and
+ get_cli_option('test-number') != $test->{'number'}) {
+
+ $skip_reason = "Only executing test " . get_cli_option('test-number');
+
+ } else {
+
+ $skip_reason = level_is_unacceptable($test->{'level'});
+ }
+
+ return $skip_reason;
+}
+
sub level_is_unacceptable ($) {
my $level = shift;
my $min_level = get_cli_option('min-level');
sub level_is_unacceptable ($) {
my $level = shift;
my $min_level = get_cli_option('min-level');