diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-10-08 18:11:40 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-01-11 11:53:30 +0100 |
commit | 92a0f7e58d4b6323d21f1c45d4c20266c35df030 (patch) | |
tree | 1f51f10f2aae10beaaf897c014510f3df10bd396 /src/bench/bench.cpp | |
parent | c561f2f06ed25f08f7776ac41aeb2999ebe79550 (diff) |
test: parse the command line arguments in unit tests
Retrieve the command line arguments from boost and pass them to
`BasicTestingSetup` so that we gain extra flexibility of passing any
config options on the test command line, e.g.:
```
test_bitcoin -- -printtoconsole=1 -checkaddrman=5
```
Diffstat (limited to 'src/bench/bench.cpp')
-rw-r--r-- | src/bench/bench.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index f696396e12..d7b4228566 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -19,6 +19,8 @@ using namespace std::chrono_literals; const std::function<void(const std::string&)> G_TEST_LOG_FUN{}; +const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS{}; + namespace { void GenerateTemplateResults(const std::vector<ankerl::nanobench::Result>& benchmarkResults, const std::string& filename, const char* tpl) |