test: Fail on self-check warnings in test_runner.py #34279

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2601-test-runner-fail-on-warn changing 3 files +5 −5
  1. maflcko commented at 9:50 am on January 14, 2026: member

    I don’t see a reason to start running the tests, if the test_runner detects warnings during the self-check.

    Usually, this will just lead to a possibly confusing test failure after some wasted time anyway.

    So just fail fast before even running any tests.

    If there was a reason to ignore the warnings, a new option could trivially be added:

    0    parser.add_argument("--ignore-self-check-warnings", dest="ignore_warnings", default=False, action="store_true",
    1                        help="Ignore test runner warnings about self-checks before running the tests")
    

    However, I don’t see the need.

  2. test: Fail on self-check warnings in test_runner.py fa2959e16d
  3. DrahtBot added the label Tests on Jan 14, 2026
  4. DrahtBot commented at 9:50 am on January 14, 2026: 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/34279.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hodlinator

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  5. hodlinator approved
  6. hodlinator commented at 10:25 am on January 14, 2026: contributor

    utACK fa2959e16d8c4bd8d3f4fa220037c5163b83d067

    Makes sense to always have these warnings be fatal regardless of running on CI or not:

    • Attempt to exclude test that doesn’t exist
    • Invalid --exclude usage
    • (New?) files that are not categorized as test/non-test.
  7. fanquake merged this on Jan 14, 2026
  8. fanquake closed this on Jan 14, 2026

  9. maflcko deleted the branch on Jan 14, 2026
  10. hebasto referenced this in commit a7bbcf85bc on Jan 14, 2026
  11. hebasto referenced this in commit 5246e3db59 on Jan 14, 2026
  12. stickies-v referenced this in commit 9fa736f8e4 on Jan 22, 2026
  13. ajtowns commented at 11:42 am on January 23, 2026: contributor

    I don’t see a reason to start running the tests, if the test_runner detects warnings during the self-check.

    Maybe some of us have random test code in our git worktrees that isn’t included in test_runner.py that isn’t worth merging but we don’t want to delete either? :angry:

  14. maflcko commented at 1:43 pm on January 23, 2026: member

    Thanks, that is good to know. As mentioned in the pull description, it is trivial to add an option for this case.

    If the tests aren’t included in test_runner, they can only be run individually outside of it, so running them should be unaffected by this pull.

    However, I guess you also want to run the full test suite in that worktree, so I added an option for this in https://github.com/bitcoin/bitcoin/pull/34392

  15. maflcko commented at 2:07 pm on January 23, 2026: member

    Though, my recommendation would be to still add the local test to the list (and git commit it).

    If the --ignore-self-check-warnings option is too tedious, maybe it could be an env var, but I’d say the default behavior should be, so that stray test files lead to an error by default.


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: 2026-01-27 06:13 UTC

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