diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-25 22:40:55 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-25 22:41:33 +0200 |
commit | f6eb85d17c6f8ed1fe043168e90d4830ab4745c3 (patch) | |
tree | 3857f67d57632885ea2873f8c08c357fea7ff3c8 | |
parent | 6f5372a1714383bb5e47a5ba89dc4d93020a2943 (diff) | |
parent | 03a2d680101a9fee47c6fd818df7585cfc93ac06 (diff) |
Merge #13707: tests: Add usage note to check-rpc-mappings.py
03a2d680101a9fee47c6fd818df7585cfc93ac06 Tests: add usage note to check-rpc-mappings.py (Mason Simon)
Pull request description:
This test would previously fail without a user-friendly warning message, if invoked with no arguments.
Test plan:
```
bitcoin @_@$ python3 test/lint/check-rpc-mappings.py
Usage: test/lint/check-rpc-mappings.py ROOT-DIR
bitcoin @_@$ echo $?
1
bitcoin @_@$ python3 test/lint/check-rpc-mappings.py .
* Checking consistency between dispatch tables and vRPCConvertParams
bitcoin @_@$ echo $?
0
```
Tree-SHA512: 0b7a94125d18ba5dbf3c3281a4af60718d2e495bf7645d7c2a3e1a2a1d80cffcea1383c90247186728037f1f2b38de75d0f59ccf7f792d69edd33884f3698c07
-rwxr-xr-x | test/lint/check-rpc-mappings.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lint/check-rpc-mappings.py b/test/lint/check-rpc-mappings.py index 33e49bac13..137cc82b5d 100755 --- a/test/lint/check-rpc-mappings.py +++ b/test/lint/check-rpc-mappings.py @@ -90,6 +90,10 @@ def process_mapping(fname): return cmds def main(): + if len(sys.argv) != 2: + print('Usage: {} ROOT-DIR'.format(sys.argv[0]), file=sys.stderr) + sys.exit(1) + root = sys.argv[1] # Get all commands from dispatch tables |