0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-06 10:18:44 -05:00
bitcoin-bitcoin-core/src/qt/test
MarcoFalke d0bf9bb6a5
Merge bitcoin/bitcoin#23373: test: Parse command line arguments from unit and fuzz tests, make addrman consistency check ratio easier to change
7f122a4188 fuzz: non-addrman fuzz tests: override-able check ratio (Vasil Dimov)
3bd83e273d fuzz: addrman fuzz tests: override-able check ratio (Vasil Dimov)
46b0fe7829 test: non-addrman unit tests: override-able check ratio (Vasil Dimov)
81e4d54d3a test: addrman unit tests: override-able check ratio (Vasil Dimov)
6dff6214be bench: put addrman check ratio in a variable (Vasil Dimov)
6f7c7567c5 fuzz: parse the command line arguments in fuzz tests (Vasil Dimov)
92a0f7e58d test: parse the command line arguments in unit tests (Vasil Dimov)

Pull request description:

  Previously command line arguments passed to unit and fuzz tests would be ignored by the tests themselves. They would be used by the boost test framework (e.g. `--run_test="addrman_tests/*"`) or by the fuzzer (e.g. `-runs=1`). However both provide ways to pass down the extra arguments to the test itself. Use that, parse the arguments and make them available to the tests via `gArgs`.

  This makes the tests more flexible as they can be run with any bitcoind config option specified on the command line.

  When creating `AddrMan` objects in tests, use `-checkaddrman=` (if provided) instead of hardcoding the check ratio in many different places. See https://github.com/bitcoin/bitcoin/pull/20233#issuecomment-889813074 for further motivation for this.

ACKs for top commit:
  mzumsande:
    re-ACK 7f122a4188
  josibake:
    reACK 7f122a4188

Tree-SHA512: 3a05e61e4d70a0569bb67594bcce3aad8fdef63cdcc54e2823a3bc9f18679571985004412b6c332a210f67849bab32d8467b4115fbff8f5fac9834982e60dcf3
2022-01-17 09:10:21 +01:00
..
addressbooktests.cpp Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods 2022-01-12 14:59:24 +02:00
addressbooktests.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
apptests.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
apptests.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
Makefile build: add stub makefiles for easier subdir builds 2014-06-05 16:05:43 -04:00
rpcnestedtests.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
rpcnestedtests.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
test_main.cpp test: parse the command line arguments in unit tests 2022-01-11 11:53:30 +01:00
uritests.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
uritests.h Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
util.cpp refactor, qt: Use std::chrono in ConfirmMessage parameter 2022-01-09 17:51:27 +02:00
util.h refactor, qt: Use std::chrono in ConfirmMessage parameter 2022-01-09 17:51:27 +02:00
wallettests.cpp Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods 2022-01-12 14:59:24 +02:00
wallettests.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00