aboutsummaryrefslogtreecommitdiff
path: root/src/qt/main.cpp
diff options
context:
space:
mode:
authorLarry Ruane <larryruane@gmail.com>2022-11-23 17:02:23 -0700
committerLarry Ruane <larryruane@gmail.com>2024-03-07 10:11:45 -0700
commitd27e2d87b95b7982c05b4c88e463cc9626ab9f0a (patch)
treeb079340cb98c0b357173190745e4d12350f0c8c0 /src/qt/main.cpp
parenteefe4bacdd2ba3e728bae939c7c680258b8f5993 (diff)
downloadbitcoin-d27e2d87b95b7982c05b4c88e463cc9626ab9f0a.tar.xz
test: test_bitcoin: allow -testdatadir=<datadir>
Specifying this argument overrides the path location for test_bitcoin; it becomes <datadir>/test_common_Bitcoin Core/<testname>/datadir. Also, this directory isn't removed after the test completes. This can make it easier for developers to study the results of a test (see the state of the data directory after the test runs), and also (for example) have an editor open on debug.log to monitor it across multiple test runs instead of having to re-open a different pathname each time. Example usage (note the "--" is needed): test_bitcoin --run_test=getarg_tests/boolarg -- \ -testdatadir=/somewhere/mydatadir This will create (if necessary) and use the data directory: /somewhere/mydatadir/test_common_Bitcoin Core/getarg_tests/boolarg/datadir Co-authored-by: furszy <mfurszy@protonmail.com>
Diffstat (limited to 'src/qt/main.cpp')
-rw-r--r--src/qt/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/main.cpp b/src/qt/main.cpp
index c84dd78b44..ded057dbfa 100644
--- a/src/qt/main.cpp
+++ b/src/qt/main.cpp
@@ -19,6 +19,8 @@ extern const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](cons
};
UrlDecodeFn* const URL_DECODE = urlDecode;
+const std::function<std::string()> G_TEST_GET_FULL_NAME{};
+
MAIN_FUNCTION
{
return GuiMain(argc, argv);