summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-12-13 19:05:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-12-14 21:14:57 +0100
commita11cd351a63c5666c99747b1969bf90fefd1d8d3 (patch)
treee793efc1f9091d0b466453d39baacbd57ce420ee
parent62f1da7f1bb99ac3a2e7a5f160ded3dc19c8b195 (diff)
tests: regression: simplify run_test_file() in case `-e' is used
Avoid copy&paste coding style pattern by simplifying the code that handles the `-e' option that allows us to run known broken tests. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rwxr-xr-xtests/regression/nft-test.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/regression/nft-test.py b/tests/regression/nft-test.py
index dea0f369..7e5b4756 100755
--- a/tests/regression/nft-test.py
+++ b/tests/regression/nft-test.py
@@ -692,23 +692,9 @@ def run_test_file(filename, force_all_family_option, specific_file):
continue
if need_fix_option:
rule[0] = rule[0].rstrip()[1:].strip()
- result = rule_add(rule, table_list, chain_list, filename,
- lineno, force_all_family_option)
- tests += 1
- warning = result[1]
- ret = result[0]
- total_warning += warning
- total_error += result[2]
- total_unit_run += result[3]
-
- if ret != 0:
- total_test_passed = False
- elif warning == 0:
- passed += 1
- continue
else:
continue
- if need_fix_option:
+ elif need_fix_option:
continue
result = rule_add(rule, table_list, chain_list, filename, lineno,