Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 601 Lines • ▼ Show 20 Lines | def check_script_prefixes(all_scripts): | ||||
EXPECTED_VIOLATION_COUNT = 29 | EXPECTED_VIOLATION_COUNT = 29 | ||||
# 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 = 10 | ||||
good_prefixes_re = re.compile( | good_prefixes_re = re.compile( | ||||
"(example|feature|interface|mempool|mining|p2p|rpc|wallet)_") | "(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( | ||||
"{}HURRAY!{} Number of functional tests violating naming convention reduced!".format( | "{}HURRAY!{} Number of functional tests violating naming convention reduced!".format( | ||||
BOLD[1], | BOLD[1], | ||||
BOLD[0])) | BOLD[0])) | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |