Skip to content

Commit f6eb85d

Browse files
committed
Merge #13707: tests: Add usage note to check-rpc-mappings.py
03a2d68 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
2 parents 6f5372a + 03a2d68 commit f6eb85d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/lint/check-rpc-mappings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ def process_mapping(fname):
9090
return cmds
9191

9292
def main():
93+
if len(sys.argv) != 2:
94+
print('Usage: {} ROOT-DIR'.format(sys.argv[0]), file=sys.stderr)
95+
sys.exit(1)
96+
9397
root = sys.argv[1]
9498

9599
# Get all commands from dispatch tables

0 commit comments

Comments
 (0)