test: Print CompletedProcess object on error #31067

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2410-test-print-err changing 1 files +11 −14
  1. maflcko commented at 4:28 pm on October 10, 2024: member

    It would be good to know the output on Error parsing command output. Otherwise test failures are meaningless: #30792 (comment)

    Fix it by just printing the full CompletedProcess object.

    Also, use the modern subprocess.run to simplify the code.

  2. DrahtBot commented at 4:29 pm on October 10, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK BrandonOdiwuor, laanwj
    Concept ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Oct 10, 2024
  4. test: Print CompletedProcess object on error fa43c4f93c
  5. maflcko force-pushed on Oct 10, 2024
  6. hebasto commented at 8:27 am on October 11, 2024: member
    Concept ACK, it seems quite useful.
  7. BrandonOdiwuor approved
  8. BrandonOdiwuor commented at 8:35 pm on October 11, 2024: contributor
    Code Review ACK fa43c4f93ca5b40734ec9b3ff91b74acf3ed7cf2
  9. DrahtBot requested review from hebasto on Oct 11, 2024
  10. adamandrews1 approved
  11. laanwj approved
  12. laanwj commented at 8:31 am on October 16, 2024: member

    for reference, a CompletedProcess object is formatted like this:

    0>>> print(subprocess.run(['/bin/ls'], capture_output=True, text=True))
    1CompletedProcess(args=['/bin/ls'], returncode=0, stdout='...', stderr='')
    

    This contains some useful information, so ACK fa43c4f93ca5b40734ec9b3ff91b74acf3ed7cf2

  13. maflcko added this to the milestone 29.0 on Oct 16, 2024
  14. fanquake merged this on Oct 16, 2024
  15. fanquake closed this on Oct 16, 2024

  16. maflcko deleted the branch on Oct 16, 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-11-21 09:12 UTC

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