tests: Remove unused includes #16278

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:cut-compilation-bloat-in-unit-tests changing 52 files +46 −62
  1. practicalswift commented at 3:28 pm on June 24, 2019: contributor

    Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

    A subset of #16273 (“refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes”) as requested by MarcoFalke in #16273 (comment).

  2. DrahtBot commented at 3:48 pm on June 24, 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:

    • #16227 (Refactor CWallet’s inheritance chain by achow101)
    • #16224 (gui: Bilingual GUI error messages by hebasto)
    • #16127 (Add support for thread safety annotations when using std::mutex by ajtowns)
    • #16069 (test: move-only: Split large tests into smaller compile units by MarcoFalke)
    • #15935 (WIP: Add /settings.json persistent settings storage by ryanofsky)
    • #15934 (Separate settings merging from parsing by ryanofsky)
    • #13751 (Utils and libraries: Drops the boost/algorithm/string/split.hpp dependency by l2a5b1)
    • #10102 ([experimental] Multiprocess bitcoin by ryanofsky)

    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.

  3. MarcoFalke commented at 4:11 pm on June 24, 2019: member
    ACK 30dfe9a86c29e6e95aac236b9273738e392cf86e (checked that added includes are required and that removed includes are not)
  4. DrahtBot added the label GUI on Jun 24, 2019
  5. DrahtBot added the label Tests on Jun 24, 2019
  6. DrahtBot added the label Wallet on Jun 24, 2019
  7. MarcoFalke removed the label GUI on Jun 24, 2019
  8. MarcoFalke removed the label Wallet on Jun 24, 2019
  9. MarcoFalke added the label Refactoring on Jun 24, 2019
  10. DrahtBot added the label Needs rebase on Jun 25, 2019
  11. DrahtBot commented at 10:49 am on June 25, 2019: member
  12. practicalswift force-pushed on Jun 25, 2019
  13. fanquake removed the label Needs rebase on Jun 25, 2019
  14. practicalswift force-pushed on Jun 25, 2019
  15. fanquake commented at 11:54 am on June 25, 2019: member

    47a15fa47519a5ab16a3d6c1dd3227dd76076365 does not compile.

     0 CCLD     libsecp256k1.la
     1  CXX      test/test_bitcoin-mempool_tests.o
     2test/fs_tests.cpp:14:26: error: use of undeclared identifier 'GetDataDir'
     3    fs::path tmpfolder = GetDataDir();
     4                         ^
     51 error generated.
     6make[2]: *** [test/test_bitcoin-fs_tests.o] Error 1
     7make[2]: *** Waiting for unfinished jobs....
     8test/flatfile_tests.cpp:16:27: error: use of undeclared identifier 'GetDataDir'
     9    const auto data_dir = GetDataDir();
    10                          ^
    11test/flatfile_tests.cpp:29:27: error: use of undeclared identifier 'GetDataDir'
    12    const auto data_dir = GetDataDir();
    13                          ^
    14test/flatfile_tests.cpp:90:27: error: use of undeclared identifier 'GetDataDir'
    15    const auto data_dir = GetDataDir();
    16                          ^
    17test/flatfile_tests.cpp:110:27: error: use of undeclared identifier 'GetDataDir'
    18    const auto data_dir = GetDataDir();
    19                          ^
    204 errors generated.
    21make[2]: *** [test/test_bitcoin-flatfile_tests.o] Error 1
    22make[1]: *** [check-recursive] Error 1
    23make: *** [check-recursive] Error 1
    
  16. practicalswift commented at 12:07 pm on June 25, 2019: contributor
    @fanquake That was fixed in 04754f7. Please re-review :-)
  17. tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests 9a841696c1
  18. in src/qt/test/test_main.cpp:17 in 04754f70c5 outdated
    13@@ -14,6 +14,7 @@
    14 #include <qt/test/uritests.h>
    15 #include <qt/test/compattests.h>
    16 #include <test/setup_common.h>
    17+#include <util/time.h>
    


    MarcoFalke commented at 6:25 pm on June 26, 2019:
    No longer needed after rebase

    practicalswift commented at 6:37 pm on June 26, 2019:

    Good catch!

    Re-ran my analysis script and it turns out that util/time.h and chainparams.h are no longer needed.

  19. practicalswift force-pushed on Jun 26, 2019
  20. practicalswift renamed this:
    tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests
    tests: Reduce compile-time memory usage, compilation time and unneccessary recompiles by removing unused includes in tests
    on Jun 27, 2019
  21. Sjors commented at 12:47 pm on June 27, 2019: member
    ACK 9a84169 on macOS 10.14.5 (I rebased on #16289)
  22. MarcoFalke renamed this:
    tests: Reduce compile-time memory usage, compilation time and unneccessary recompiles by removing unused includes in tests
    tests: Remove unused includes in tests
    on Jun 27, 2019
  23. MarcoFalke renamed this:
    tests: Remove unused includes in tests
    tests: Remove unused includes
    on Jun 27, 2019
  24. pull[bot] referenced this in commit 7400135b79 on Jun 27, 2019
  25. MarcoFalke merged this on Jun 27, 2019
  26. MarcoFalke closed this on Jun 27, 2019

  27. deadalnix referenced this in commit 6a4262702c on Mar 26, 2020
  28. practicalswift deleted the branch on Apr 10, 2021
  29. vijaydasmp referenced this in commit 3531aa95e8 on Nov 23, 2021
  30. vijaydasmp referenced this in commit 4d1b3654aa on Nov 23, 2021
  31. vijaydasmp referenced this in commit bfb32d6b2d on Nov 24, 2021
  32. vijaydasmp referenced this in commit 3f839b0758 on Nov 25, 2021
  33. vijaydasmp referenced this in commit 89b2eccaa0 on Nov 26, 2021
  34. PastaPastaPasta referenced this in commit b0b8b2d2a9 on Nov 30, 2021
  35. DrahtBot locked this on Aug 18, 2022

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-07-03 13:13 UTC

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