diff options
| author | MarcoFalke <[email protected]> | 2018-01-30 08:01:44 -0500 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-01-30 08:01:46 -0500 |
| commit | 8d573198638e52e2dbd9abc609861430f9d2bcc3 (patch) | |
| tree | 45fb540deb8dd2642a7b6ee7dbf5d16257cd756d | |
| parent | qt: Periodic translations update (diff) | |
| parent | [tests] Require all tests to follow naming convention (diff) | |
| download | discoin-8d573198638e52e2dbd9abc609861430f9d2bcc3.tar.xz discoin-8d573198638e52e2dbd9abc609861430f9d2bcc3.zip | |
Merge #12252: Require all tests to follow naming convention
125f4a4909 [tests] Require all tests to follow naming convention (Anthony Towns)
Pull request description:
Based on top of #11774
Tree-SHA512: 1eb156b5a97b30c203b7b0ad3d2055b391ef825e2e57805c7745b5259a9b1caaa115768ec225452f12f354e550f83e071f9c6fee2c36698b4679191895aab8de
| -rwxr-xr-x | test/functional/test_runner.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 98944685e..c670878d6 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -472,21 +472,15 @@ class TestResult(): def check_script_prefixes(): - """Check that at most a handful of the - test scripts don't start with one of the allowed name prefixes.""" - - # LEEWAY is provided as a transition measure, so that pull-requests - # that introduce new tests that don't conform with the naming - # convention don't immediately cause the tests to fail. - LEEWAY = 10 + """Check that test scripts start with one of the allowed name 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) > 0: - print("INFO: %d tests not meeting naming conventions:" % (len(bad_script_names))) + if bad_script_names: + print("%sERROR:%s %d tests not meeting naming conventions:" % (BOLD[1], BOLD[0], len(bad_script_names))) print(" %s" % ("\n ".join(sorted(bad_script_names)))) - assert len(bad_script_names) <= LEEWAY, "Too many tests not following naming convention! (%d found, maximum: %d)" % (len(bad_script_names), LEEWAY) + raise AssertionError("Some tests are not following naming convention!") def check_script_list(src_dir): |