aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/test_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* gui: Replace interface::Node references with pointersRussell Yanofsky2020-08-261-5/+6
| | | | | | No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
* gui: Partially revert #10244 gArgs and Params changesRussell Yanofsky2020-08-261-2/+1
| | | | | | | | | | | | | | | | | | Change gui code to use gArgs, Params() functions directly instead of going through interfaces::Node. Remotely accessing bitcoin-node ArgsManager from bitcoin-gui works fine in https://github.com/bitcoin/bitcoin/pull/10102, when bitcoin-gui spawns a new bitcoin-node process and controls its startup, but for bitcoin-gui to support -ipcconnect option in https://github.com/bitcoin/bitcoin/pull/19461 and connect to an existing bitcoin-node process, it needs ability to parse arguments itself before connecting out. This change also simplifies https://github.com/bitcoin/bitcoin/pull/10102 a bit, by making the bitcoin-gui -> bitcoin-node startup sequence more similar to the bitcoin-node -> bitcoin-wallet startup sequence where the parent process parses arguments and passes them to the child process instead of the parent process using the child process to parse arguments.
* test: Remove duplicate NodeContext hacksRussell Yanofsky2020-07-131-1/+2
| | | | | | | | | | | | | | | | | | | | Qt tests currently are currently using two NodeContext structs at the same time, one in interfaces::NodeImpl::m_context, and the other in BasicTestingSetup::m_node, and the tests have hacks transferring state between them. Fix this by getting rid of the NodeImpl::m_context struct and making it a pointer. This way a common BitcoinApplication object can be used for all qt tests, but they can still have their own testing setups. Non-test code is changing but non-test behavior is still the same as before. Motivation for this PR is to be able to remove the "std::move(test.m_node.connman)" and mempool hacks for swapping individual NodeContext members in Qt tests, because followup PR #19099 adds yet another member (wallet_client) that needs to be swapped. After this change, the whole NodeContext struct can be swapped instead of individual members, so the workarounds are less fragile and invasive.
* wallet: Pass unused args to StartWalletsMarcoFalke2020-07-091-1/+3
| | | | This refactor does not change behavior
* test: Show debug log on unit test failureMarcoFalke2020-01-021-0/+2
|
* scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
* Pass NodeContext, ConnMan, BanMan references more placesRussell Yanofsky2019-10-281-4/+4
| | | | So g_connman and g_banman globals can be removed next commit.
* Remove BIP70 Supportfanquake2019-10-241-9/+0
|
* qa: Do not force overwrite of QT_QPA_PLATFORM on windows for gui testsMarcoFalke2019-10-011-1/+1
|
* doc: Explain QT_QPA_PLATFORM for gui testsMarcoFalke2019-10-011-1/+1
|
* Give QApplication dummy argumentsAndrew Chow2019-08-091-1/+1
| | | | | | QApplication takes the command line arguments and parses them itself for some built in command line arguments that it has. We don't want any of those built in arguments, so instead give it dummy arguments.
* test: only include and init openSSL where it's actually usedfanquake2019-08-061-4/+0
|
* qt: test: Create at most one testing setupMarcoFalke2019-06-271-3/+9
|
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-1/+0
| | | | unused includes in tests
* test: use common setup in gui testsMarcoFalke2019-06-201-11/+3
|
* Add BitcoinApplication & RPCConsole testsRussell Yanofsky2019-01-041-2/+10
| | | | Add test coverage for Qt initialization code & basic RPC console functionality.
* scripted-diff: Move util files to separate directory.Jim Posen2018-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
* build: Add --disable-bip70 configure optionWladimir J. van der Laan2018-10-091-2/+4
| | | | | | This patch adds a --disable-bip70 configure option that disables BIP70 payment request support. When disabled, this removes the dependency of the GUI on OpenSSL and Protobuf.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* gui: Remove QT_VERSION fallbacks for Qt < 5Wladimir J. van der Laan2018-06-181-7/+0
| | | | | | | There were surprisingly many `#ifdef` fallbacks for Qt 4. Remiving them simplifies maintenance, as well as adding new GUI functionality.
* [tests] [qt] Add tests for address book manipulation via EditAddressDialogJames O'Beirne2018-04-251-0/+5
| | | | Also modifies corresponding QT code to allow for use within test cases.
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Stop test_bitcoin-qt touching ~/.bitcoinMeshCollider2017-09-011-0/+6
|
* Merge #10705: Trivial: spelling fixesMarcoFalke2017-08-161-1/+1
|\ | | | | | | | | | | | | | | | | | | f42fc1d50 doc: spelling fixes (klemens) Pull request description: patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ). Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
| * doc: spelling fixesklemens2017-08-161-1/+1
| |
* | Qt: Use _putenv_s instead of setenv on Windows buildsBrian McMichael2017-07-211-1/+5
|/
* Run bitcoin_test-qt under minimal QPA platformRussell Yanofsky2017-04-031-0/+8
| | | | | | | | | Fixes broken "make check" reported by Matt Corallo <[email protected]> in https://github.com/bitcoin/bitcoin/issues/10110 Fix was suggested and initially implemented by Cory Fields <[email protected]> in https://github.com/bitcoin/bitcoin/pull/10117#issuecomment-290275236
* Add new test_bitcoin-qt static library dependenciesRussell Yanofsky2017-03-151-1/+11
| | | | | | | | Avoids following error when qt is statically linked into the test binary, as on travis: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
* Add simple qt wallet test sending a transactionRussell Yanofsky2017-03-151-3/+10
|
* Add braces to if statements in Qt test_mainRussell Yanofsky2017-03-151-4/+8
|
* Make qt test compatible with TestChain100Setup frameworkRussell Yanofsky2017-03-101-3/+0
| | | | | Reset global state after rpc tests, and remove unnecessary ECC initialization to prevent assert error if it is initialized twice.
* Uses built-in byte swap if available (Apple) and if bswap_XX is undefined.Karl-Johan Alm2016-12-171-0/+4
| | | | Defers to pre-defined version if found (e.g. protobuf). For protobuf case, the definitions are identical and thus include order should not affect results.
* [Qt] RPC-Console: support nested commands and simple value queriesJonas Schnelli2016-08-231-1/+15
| | | | | | | | | | | | | | | | Commands can be executed with bracket syntax, example: `getwalletinfo()`. Commands can be nested, example: `sendtoaddress(getnewaddress(), 10)`. Simple queries are possible: `listunspent()[0][txid]` Object values are accessed with a non-quoted string, example: [txid]. Fully backward compatible. `generate 101` is identical to `generate(101)` Result value queries indicated with `[]` require the new brackets syntax. Comma as argument separator is now also possible: `sendtoaddress,<address>,<amount>` Space as argument separator works also with the bracket syntax, example: `sendtoaddress(getnewaddress() 10) No dept limitation, complex commands are possible: `decoderawtransaction(getrawtransaction(getblock(getbestblockhash())[tx][0]))[vout][0][value]`
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* tests: fix qt payment testCory Fields2015-09-021-0/+4
| | | | | Now that boost no longer automatically initializes openssl, we have to do it ourselves.
* Initialization: setup environment before starting QT testsdexX72015-03-291-0/+2
| | | | The environment is prepared by the main thread to guard against invalid locale settings.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* [Qt] copyright, style and indentation cleanup of Qt testsPhilip Kaufmann2014-09-051-1/+6
|
* build: fix build weirdness after 54372482.Cory Fields2014-06-231-1/+1
| | | | | | | | | | | | | bitcoin-config.h moved, but the old file is likely to still exist when reconfiguring or switching branches. This would've caused files to not rebuild correctly, and other strange problems. Make the path explicit so that the old one cannot be found. Core libs use config/bitcoin-config.h. Libs (like crypto) which don't want access to bitcoin's headers continue to use -Iconfig and #include bitcoin-config.h.
* Update test_main.cppLongShao0072014-05-221-1/+0
| | | i think should delete (#include "bitcoin-config.h")。
* GUI for --disable-wallet compiles and -disablewallet modeWladimir J. van der Laan2014-01-111-1/+8
| | | | | | | | There is not much in the GUI to be done without wallet, though it's possible to change options, watch the sync process, and use the debug console. So embed the debug console in the main window.
* qt5: tests: Make sure static plugin symbols are pulled inCory Fields2014-01-101-0/+9
| | | | | | | | Since we're now properly linking against static plugins for qt binaries, we need to ensure that they're Imported properly. Without these Imports, the linker drops some of the unused linked libs, causing undefined symbols in QtCore.
* [Qt] misc PaymentServer changes (e.g. changes to eventFilter())Philip Kaufmann2013-12-061-2/+6
| | | | | | | | | | | | - make eventFilter() private and pass events on to QObject::eventFilter() instead of just returning false - re-work paymentservertest.cpp to correctly handle the event test after the above change (rewrite test_main to allow usage of QCoreApplication:: in the tests) - delete socket when we were unable to connect in ipcSendCommandLine() - show a message to the user if we fail to start-up (instead of just a debug.log entry) - misc small comment changes
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-3/+5
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-16/+21
| | | | | | | | Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
* Return !0 when qt tests fail.Matt Corallo2012-08-071-1/+6
|
* Bugfix: Replace "URL" with "URI" where we aren't actually working with URLsLuke Dashjr2012-04-061-2/+2
|
* Add Bitcoin-Qt test suite with some bitcoin: URL Tests to start.Matt Corallo2012-02-101-0/+11