test: autogenerate bash completion #30860

pull BrandonOdiwuor wants to merge 3 commits into bitcoin:master from BrandonOdiwuor:bash-completion changing 11 files +498 −57
  1. BrandonOdiwuor commented at 8:26 am on September 10, 2024: contributor

    Fixes #17289, and follows up on #18606

    Adds a functional test that parses available RPC commands, generates the associated bitcoin-cli autocomplete file and checks that the current autocomplete file matches.

    An outdated autocomplete file can be updated via the –overwrite test parameter.

  2. DrahtBot commented at 8:26 am on September 10, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30860.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    No conflicts as of last run.

  3. DrahtBot added the label Tests on Sep 10, 2024
  4. fanquake commented at 3:44 pm on September 10, 2024: member

    https://github.com/bitcoin/bitcoin/actions/runs/10788681404/job/29919981336?pr=30860#step:7:3564:

    0Run rpc with args ['/Users/runner/work/bitcoin/bitcoin/ci/scratch/build-x86_64-apple-darwin/src/test/fuzz/fuzz', PosixPath('/Users/runner/work/bitcoin/bitcoin/ci/scratch/qa-assets/fuzz_corpora/rpc')]Error: RPC command "format" not found in RPC_COMMANDS_SAFE_FOR_FUZZING or RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update src/test/fuzz/rpc.cpp.
    1libc++abi: terminating
    2
    3Error: RPC command "format" not found in RPC_COMMANDS_SAFE_FOR_FUZZING or RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update src/test/fuzz/rpc.cpp.
    4libc++abi: terminating
    5
    6Target ['/Users/runner/work/bitcoin/bitcoin/ci/scratch/build-x86_64-apple-darwin/src/test/fuzz/fuzz', PosixPath('/Users/runner/work/bitcoin/bitcoin/ci/scratch/qa-assets/fuzz_corpora/rpc')] failed with exit code -6
    
  5. DrahtBot commented at 7:14 pm on September 10, 2024: contributor

    🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/29919986329

    Make sure to run all tests locally, according to the documentation.

    The failure may happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  6. DrahtBot added the label CI failed on Sep 10, 2024
  7. maflcko commented at 12:35 pm on October 1, 2024: member
    Are you still working on this? (It looks like this has been opened as draft, with failing CI, which is fine. However, without any progress, it seems better to close this for now.)
  8. BrandonOdiwuor force-pushed on Oct 4, 2024
  9. BrandonOdiwuor force-pushed on Oct 4, 2024
  10. BrandonOdiwuor force-pushed on Oct 4, 2024
  11. DrahtBot added the label Needs rebase on Oct 10, 2024
  12. BrandonOdiwuor force-pushed on Oct 23, 2024
  13. rpc: add format command with support for args_cli
     - add format command to get infos about commands via a particular format
     - add output format args_cli to get arguments type info of shown commands
     - refactor RPCArg::ToTypeString to be used accross multiple output formats
     - overload CRPCTable::execute to call != methods than in their request
    
    Co-authored-by: pierrenn <git@pnn.sh>
    eb43862887
  14. contrib: sync bitcoin-cli bash autocompletion a1dbf69a78
  15. test: keeps bitcoin-cli autocomplete in sync
    Adds a functional test which parses available RPC commands, generates
    the associated bitcoin-cli autcomplete file and checks that the current
    autocomplete matches the file
    An outdated autcomplete file can be updated using the --overwrite parameter
    
    Co-authored-by: pierrenn <git@pnn.sh>
    7c8b021fee
  16. BrandonOdiwuor force-pushed on Oct 23, 2024
  17. DrahtBot removed the label Needs rebase on Oct 23, 2024
  18. DrahtBot removed the label CI failed on Oct 23, 2024
  19. in test/functional/tool_cli_bash_completion.py:261 in 7c8b021fee
    256+            self.options.header = path.join(test_data_dir, 'bitcoin-cli.header.bash-completion')
    257+
    258+        if self.options.footer is None or len(self.options.footer) == 0:
    259+            self.options.footer = path.join(test_data_dir, 'bitcoin-cli.footer.bash-completion')
    260+
    261+        if self.options.completion is None or len(self.option.completion) == 0:
    


    luke-jr commented at 3:44 pm on November 15, 2024:
    0        if self.options.completion is None or len(self.options.completion) == 0:
    
  20. luke-jr changes_requested
  21. DrahtBot added the label CI failed on Dec 2, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me