Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 656 Lines • ▼ Show 20 Lines | |||||
def check_script_prefixes(all_scripts): | def check_script_prefixes(all_scripts): | ||||
"""Check that no more than `EXPECTED_VIOLATION_COUNT` of the | """Check that no more than `EXPECTED_VIOLATION_COUNT` of the | ||||
test scripts don't start with one of the allowed name prefixes.""" | test scripts don't start with one of the allowed name prefixes.""" | ||||
EXPECTED_VIOLATION_COUNT = 24 | EXPECTED_VIOLATION_COUNT = 24 | ||||
# LEEWAY is provided as a transition measure, so that pull-requests | # LEEWAY is provided as a transition measure, so that pull-requests | ||||
# that introduce new tests that don't conform with the naming | # that introduce new tests that don't conform with the naming | ||||
# convention don't immediately cause the tests to fail. | # convention don't immediately cause the tests to fail. | ||||
LEEWAY = 10 | LEEWAY = 0 | ||||
good_prefixes_re = re.compile( | good_prefixes_re = re.compile( | ||||
"(abc_)?(example|feature|interface|mempool|mining|p2p|rpc|wallet|tool)_") | "(abc_)?(example|feature|interface|mempool|mining|p2p|rpc|wallet|tool)_") | ||||
bad_script_names = [ | bad_script_names = [ | ||||
script for script in all_scripts if good_prefixes_re.match(script) is None] | script for script in all_scripts if good_prefixes_re.match(script) is None] | ||||
if len(bad_script_names) < EXPECTED_VIOLATION_COUNT: | if len(bad_script_names) < EXPECTED_VIOLATION_COUNT: | ||||
print( | print( | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |