Skip to content

Commit

Permalink
Merge bitcoin#13707: tests: Add usage note to check-rpc-mappings.py
Browse files Browse the repository at this point in the history
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
  • Loading branch information
laanwj authored and Munkybooty committed Jun 15, 2021
1 parent a14593b commit edac135
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/lint/check-rpc-mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,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
Expand Down

0 comments on commit edac135

Please sign in to comment.