Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 650 Lines • ▼ Show 20 Lines | def check_script_prefixes(all_scripts): | ||||
EXPECTED_VIOLATION_COUNT = 16 | EXPECTED_VIOLATION_COUNT = 16 | ||||
# 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 = 0 | 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|framework_test)_") | ||||
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 208 Lines • Show Last 20 Lines |