test: Log to debug.log in all unit tests #16252

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:1905-bufferLog changing 16 files +52 −54
  1. MarcoFalke commented at 1:41 pm on June 20, 2019: member

    This makes it easier to debug a frozen test or a test that failed. To debug a failed test, remove the line fs::remove_all(m_path_root);.

    The pull is done in three commits:

    • Create a datadir for every unit test once (and only once). This requires the SetDataDir function to go away.
    • Use the common setup in the gui unit tests. Some of those tests are testing the init sequence, so we’d have to undo some of what the testing setup did.
    • Log to the debug.log in all tests
  2. test: Create data dir in BasicTestingSetup fad3d2a624
  3. test: use common setup in gui tests fa4a04a5a9
  4. DrahtBot added the label GUI on Jun 20, 2019
  5. DrahtBot added the label Tests on Jun 20, 2019
  6. DrahtBot added the label Wallet on Jun 20, 2019
  7. MarcoFalke removed the label Wallet on Jun 20, 2019
  8. MarcoFalke force-pushed on Jun 20, 2019
  9. MarcoFalke force-pushed on Jun 20, 2019
  10. MarcoFalke force-pushed on Jun 20, 2019
  11. laanwj commented at 3:54 pm on June 20, 2019: member

    Concept ACK. I think logging can be useful for tests.

    To be clear: this creates a temporary data directory for debug.log right, it doesn’t touch the default data directory?

  12. MarcoFalke commented at 3:57 pm on June 20, 2019: member

    Yes, that should absolutely never happen, with or without this pull request. See also:

    https://github.com/bitcoin/bitcoin/blob/413e438ea9767710d4810c4400fd1242ca52cd1c/.travis/test_05_before_script.sh#L9

  13. test: Log to debug.log in all tests fabc57e07d
  14. MarcoFalke force-pushed on Jun 20, 2019
  15. DrahtBot commented at 10:33 pm on June 23, 2019: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16278 (tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests by practicalswift)
    • #16273 (refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes by practicalswift)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  16. laanwj commented at 10:12 am on June 25, 2019: member
    code review, tested that debug.logs are being created under ./test_common_Bitcoin Core/*/debug.log ACK fabc57e07dc34c103552cb51c9277bb48ef97739
  17. laanwj merged this on Jun 25, 2019
  18. laanwj closed this on Jun 25, 2019

  19. laanwj referenced this in commit c52776e6ff on Jun 25, 2019
  20. MarcoFalke deleted the branch on Jun 25, 2019
  21. sidhujag referenced this in commit dd92d69365 on Jun 30, 2019
  22. deadalnix referenced this in commit abd12750b3 on Mar 26, 2020
  23. Munkybooty referenced this in commit 296eb2a0cf on Oct 30, 2021
  24. Munkybooty referenced this in commit 46d98ef34d on Oct 30, 2021
  25. Munkybooty referenced this in commit b0358e0034 on Nov 2, 2021
  26. Munkybooty referenced this in commit 9393b05dd9 on Nov 2, 2021
  27. Munkybooty referenced this in commit 642425c786 on Nov 4, 2021
  28. Munkybooty referenced this in commit 9be93e871e on Nov 16, 2021
  29. Munkybooty referenced this in commit 6d6630d251 on Nov 18, 2021
  30. DrahtBot locked this on Dec 16, 2021

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-18 18:12 UTC

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