Check that test scripts start with one of the allowed name prefixes.
()
| 769 | |
| 770 | |
| 771 | def check_script_prefixes(): |
| 772 | """Check that test scripts start with one of the allowed name prefixes.""" |
| 773 | |
| 774 | good_prefixes_re = re.compile("^(example|feature|interface|mempool|mining|p2p|rpc|wallet|tool)_") |
| 775 | bad_script_names = [script for script in ALL_SCRIPTS if good_prefixes_re.match(script) is None] |
| 776 | |
| 777 | if bad_script_names: |
| 778 | print("%sERROR:%s %d tests not meeting naming conventions:" % (BOLD[1], BOLD[0], len(bad_script_names))) |
| 779 | print(" %s" % ("\n ".join(sorted(bad_script_names)))) |
| 780 | raise AssertionError("Some tests are not following naming convention!") |
| 781 | |
| 782 | |
| 783 | def check_script_list(*, src_dir, fail_on_warn): |