mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-18 06:00:43 +02:00

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>
28 lines
751 B
C++
28 lines
751 B
C++
// Copyright (c) 2018-2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <qt/bitcoin.h>
|
|
|
|
#include <common/url.h>
|
|
#include <compat/compat.h>
|
|
#include <util/translation.h>
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
/** Translate string to current locale using Qt. */
|
|
extern const std::function<std::string(const char*)> G_TRANSLATION_FUN = [](const char* psz) {
|
|
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
|
|
};
|
|
UrlDecodeFn* const URL_DECODE = urlDecode;
|
|
|
|
const std::function<std::string()> G_TEST_GET_FULL_NAME{};
|
|
|
|
MAIN_FUNCTION
|
|
{
|
|
return GuiMain(argc, argv);
|
|
}
|