aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2018-01-25 09:44:30 +1000
committerAnthony Towns <aj@erisian.com.au>2018-01-25 09:44:30 +1000
commit6f881cc8809e2c0d0150c47494bc37f2eb05ec66 (patch)
tree6d8c8226f05a765483eff94aedfccd8cf483cf55
parent3150b3fea732df23c6273f43102cc64783aaee9c (diff)
downloadbitcoin-6f881cc8809e2c0d0150c47494bc37f2eb05ec66.tar.xz
[tests] Remove EXPECTED_VIOLATION_COUNT
-rwxr-xr-xtest/functional/test_runner.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 1915406966..98944685e1 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -472,9 +472,8 @@ class TestResult():
def check_script_prefixes():
- """Check that no more than `EXPECTED_VIOLATION_COUNT` of the
+ """Check that at most a handful of the
test scripts don't start with one of the allowed name prefixes."""
- EXPECTED_VIOLATION_COUNT = 0
# LEEWAY is provided as a transition measure, so that pull-requests
# that introduce new tests that don't conform with the naming
@@ -484,13 +483,10 @@ def check_script_prefixes():
good_prefixes_re = re.compile("(example|feature|interface|mempool|mining|p2p|rpc|wallet)_")
bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None]
- if len(bad_script_names) < EXPECTED_VIOLATION_COUNT:
- print("{}HURRAY!{} Number of functional tests violating naming convention reduced!".format(BOLD[1], BOLD[0]))
- print("Consider reducing EXPECTED_VIOLATION_COUNT from %d to %d" % (EXPECTED_VIOLATION_COUNT, len(bad_script_names)))
- elif len(bad_script_names) > EXPECTED_VIOLATION_COUNT:
- print("INFO: %d tests not meeting naming conventions (expected %d):" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT))
+ if len(bad_script_names) > 0:
+ print("INFO: %d tests not meeting naming conventions:" % (len(bad_script_names)))
print(" %s" % ("\n ".join(sorted(bad_script_names))))
- assert len(bad_script_names) <= EXPECTED_VIOLATION_COUNT + LEEWAY, "Too many tests not following naming convention! (%d found, expected: <= %d)" % (len(bad_script_names), EXPECTED_VIOLATION_COUNT)
+ assert len(bad_script_names) <= LEEWAY, "Too many tests not following naming convention! (%d found, maximum: %d)" % (len(bad_script_names), LEEWAY)
def check_script_list(src_dir):