aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_runner.py
AgeCommit message (Collapse)Author
2018-01-03Merge #12062: Increment MIT Licence copyright header year on files modified ↵Wladimir J. van der Laan
in 2017 595a7ba Increment MIT Licence copyright header year on files modified in 2017 (Akira Takizawa) Pull request description: Edited via: $ contrib/devtools/copyright_header.py update . ps) It is the same commit as #9450 Tree-SHA512: 274bfcd6cf2914315ed52f6db773a68800ce9d6bd225a3142654483f0bbc3fd865009e62f9d954f65765d038c626e55d2a64e37e16843809adc2f67abe659b6d
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-12-21qa: Note on test order in test_runnerMarcoFalke
2017-12-20Add configuration/argument testingMeshCollider
2017-12-06[QA] Add node_network_limited testJonas Schnelli
2017-12-04Merge #11781: Add `-debuglogfile` optionWladimir J. van der Laan
5a7c09a test: Add tests for `-debuglogfile` with subdirs (Anthony Towns) 4158734 doc: Update release notes for `-debuglogfile` (Wladimir J. van der Laan) 2323242 test: Add test for `-debuglogfile` (Wladimir J. van der Laan) cf5f432 Add `-debuglogfile` option (Wladimir J. van der Laan) Pull request description: This patch adds an option to configure the name and/or directory of the debug log file. The user can specify either a relative path, in which case the path is relative to the (network specific) data directory. They can also specify an absolute path to put the log anywhere else in the file system. Alternative to #11741 that gets rid of the concept of a "log directory" by specifying the path for the specific kind of log, the debug log. Which happens to be the only kind of log we have at this point*, but a hypothetical new kind of log (say, an audit log) would get a new option. This has more flexibility than specifying a directory which has to contain all of them. \* excluding `db.log` which is internally generated by the wallet database library, but that one moves along with `-walletdir`. Tree-SHA512: 4434d0e598dc23504e5c9e67fdbaef56db4f0fd490f9f54fd503e69d4dda9b5b69c539e1794ed841e72161b7b1dc3374d2f1193dd431b057566750e56fd8f24b
2017-12-01test: Add test for `-debuglogfile`Wladimir J. van der Laan
2017-11-29[tests] Add combinedlogslen argument to test_runner.pyJohn Newbery
Instead of calling combine_logs from test_runner when the environment variable PYTHON_DEBUG is set, add a combinedlogslen argument. This makes it easier to call when running locally, and allows a different length of combined logs to be printed.
2017-11-29[tests] [travis-ci] Move Travis functional test log post processing to ↵John Newbery
test_runner
2017-11-18Make debugging test crash easierMeshCollider
2017-10-31Make p2p-acceptablock not an extended testMatt Corallo
2017-10-18Merge #11486: [tests] Add uacomment testsWladimir J. van der Laan
c5dfa90 [tests] Add uacomment tests (Cristian Mircea Messel) Pull request description: Checks for setting the value, max length and reserved characters Tree-SHA512: a62e2cf8e455a3cd3987c0855f7bfc49de47504c01263e3573366e3cbff400c5678224773d4f1e4ac684fff34d987994e490a0978c4da05ff2a4bfa972c84723
2017-10-16[tests] Don't subclass from object for Python 3John Newbery
2017-10-11[tests] Add uacomment testsCristian Mircea Messel
Checks for setting the value, max length and reserved characters
2017-10-11Merge #10941: Add blocknotify and walletnotify functional testsWladimir J. van der Laan
857b32b [tests] Add -walletnotify functional test (João Barbosa) df18d29 [tests] Add -blocknotify functional test (João Barbosa) 9c72a46 [tests] Tidy up forknotify.py (John Newbery) Pull request description: This patch adds the missing functional tests for `-blocknotify` and `-walletnotify` notifications. The `-alertnotify` test file `forknotify.py` is renamed to `notifications.py` to accommodate the new tests. Credits to @jnewbery for this cleanup and unification. Tree-SHA512: ee7b28b9f1bd225587efaefa6427c6d080ccb50ead390b23d94717c137a317183b37be00da0b2bffedd4192a363c971dea510d78d29278eb9fa76374f7855c09
2017-10-10[tests] Add -blocknotify functional testJoão Barbosa
2017-10-03[test] P2P functional test for certain fingerprinting protectionsJim Posen
2017-09-26[rpc] [tests] Add deprecated RPC testCristian Mircea Messel
2017-09-05[qa] Test nMinimumChainWorkSuhas Daftuar
Nodes don't consider themselves out of "initial block download" until their active chain has more work than nMinimumChainWork. While in initial block download, nodes won't relay blocks to their peers, so test that this parameter functions as intended by verifying that block relay only succeeds past a given node once its nMinimumChainWork has been exceeded.
2017-08-24Merge #10798: [tests] [utils] test bitcoin-cliMarcoFalke
c6ec4358a [tests] Add bitcoin_cli.py test script (John Newbery) b23549f6e [tests] add TestNodeCLI class for calling bitcoin-cli for a node (John Newbery) Pull request description: We don't test bitcoin-cli at all. That means that we can miss inconsistencies between the bitcoin-cli client and the RPC interface, such as #10698 and #10747. It also means that the various bitcoin-cli options and features are untested and regressions could be silently introduced. Let's fix that. This PR adds bitcoin-cli testing in the python functional test_framework: 1. Add a bitcoin_cli.py test script that tests bitcoin-cli. At the moment it only tests that the result of `getinfo` is the same if you run it as an RPC or through bitcoin-cli, but can easily be extended to test additional bitcoin-cli features **EDIT: `--usecli` option is moved to a separate PR. This PR now only covers the bitcoin_cli.py test.** 2. ~Add a `--usecli` option to the test framework. This changes the test to use bitcoin-cli for all RPC calls instead of using direct HTTP requests. This is somewhat experimental. It works for most tests, but there are some cases where it can't work transparently because:~ - ~the testcase is asserting on a specific error code, and bitcoin-cli returns a different error code from the direct RPC~ - ~we're sending a very large RPC request (eg `submitblock`) and it can't be serialized into a shell bitcoin-cli call.~ ~I think that even though `--usecli` doesn't work on all tests, it's still a useful experimental feature. Future potential enhancements:~ - ~enhance the framework to automatically skip tests that are known to fail with bitcoin-cli if the `--usecli` option is used.~ - ~run a subset of tests in Travis with `-usecli`~ This builds on and requires the `TestNode` PR #10711 . As an aside, this is a good demonstration of how tidy it is to add additional features/interfaces now that test node logic/state is encapsulated in a TestNode class. Addresses #10791 Tree-SHA512: a1e6be12e8e007f6f67b3d3bbcd142d835787300831eb38e6027a1ad25ca9d79c4bc99a41b19e31ee95205cba1b3b2d21a688b5909316aad70bfc2b4eb6d8a52
2017-08-16Merge #10680: Fix inconsistencies and grammar in various filesMarcoFalke
1d8df0141 Fix MD formatting in REST-interface.md and spelling mistake in test_runner.py (MeshCollider) 41f3e84aa Fix inconsistencies and grammar in various files (MeshCollider) Pull request description: Just a simple fix of some inconsistent capitalization, formatting and grammar in a few files (no code changes) Tree-SHA512: 60b12a5a5c69a1af4a25b7db0b32ed806ed62ad2966cee08b3792a7cfa7f51848fd485349b4c09e60a7eedfdf55ee730c51daa066d6e226ae404c93342bf3e13
2017-08-16Merge #10705: Trivial: spelling fixesMarcoFalke
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
2017-08-16doc: spelling fixesklemens
2017-08-15[tests] Add bitcoin_cli.py test scriptJohn Newbery
2017-08-15[tests] add TestNodeCLI class for calling bitcoin-cli for a nodeJohn Newbery
2017-08-14Merge #11022: Basic keypool topupWladimir J. van der Laan
d34957e [wallet] [tests] Add keypool topup functional test (Jonas Schnelli) 095142d [wallet] keypool mark-used and topup (John Newbery) c25d90f [wallet] Add HasUnusedKeys() helper (John Newbery) f2123e3 [wallet] Cache keyid -> keypool id mappings (John Newbery) 83f1ec3 [wallet] Don't hold cs_LastBlockFile while calling setBestChain (John Newbery) 2376bfc [wallet] [moveonly] Move LoadKeyPool to cpp (Matt Corallo) cab8557 [wallet] [moveonly] Move CAffectedKeysVisitor (Jonas Schnelli) Pull request description: This PR contains the first part of #10882 : - if a key from the keypool is used, mark all keys up to that key as used, and then try to top up the keypool - top up the keypool on startup Notably, it does not stop the node or prevent the best block from advancing if the keypool drops below a threshold (which means that transactions may be missed and funds lost if restoring from an old HD wallet backup). Tree-SHA512: ac681fefeaf7ec2aab2fa1da93d12273ea80bd05eb48d7b3b551ea6e5d975dd97ba7de52b7fba52993823280ac4079cc36cf78a27dac708107ebf8fb6326142b
2017-08-12test: Add resendwallettransactions functional testsJoão Barbosa
2017-08-10[wallet] [tests] Add keypool topup functional testJonas Schnelli
2017-08-08Merge #10695: [qa] Rewrite BIP65/BIP66 functional testsMarcoFalke
4ccc12a54 [qa] Rewrite BIP66 functional tests (Suhas Daftuar) d4f0d87b6 [qa] Rewrite BIP65 functional tests (Suhas Daftuar) Pull request description: After 122786d0e0170c73536360b705af711e1338adbf, BIP65 and BIP66 activate at particular fixed heights (without regard to version numbers of blocks below those heights). Rewrite the functional tests to take this into account, and remove two tests that weren't really testing anything. Moves the rewritten functional tests out of the extended test suite, so that they run in travis regularly. Note: I discovered that the ComparisonTestFramework (which the original versions of these p2p tests were written is, has a bug that caused them to not catch obvious errors, eg if you just comment out setting the script flags for these softforks in ConnectBlock, the versions of these tests in master do not fail(!) -- will separately PR a fix for the comparison test framework). Tree-SHA512: 2108b79951f2e980854d0d14ccc0fd1810a43dd4251fd6e3b203e7f104ea55e00650bb1a60a28c2801b4249f46563a8559ac3e3cd39db220914acfed0b3b163d
2017-07-25Revert "[tests] Allow tests to pass when stderr is non-empty"Wladimir J. van der Laan
This reverts commit d64ac3f4aab13a1a4e8d320b52e7a2b934e011b2 after further discussion. Tree-SHA512: db1e4ff5b17bcd6fd000a3d21aa74f6b7e4c194e0663c1896a100612671910a7cdadd896b59642420ea016598895b54a8468914847ebefef105a3c47c311d4b2
2017-07-25Merge #10703: [tests] Allow tests to pass when stderr is non-emptyMarcoFalke
d64ac3f [tests] Allow tests to pass when stderr is non-empty (Jonas Schnelli) Pull request description: Resurrect #10241 with nits addressed Not sure how much people want this. Would be useful for functional tests which cause bitcoind to print to stderr. Tree-SHA512: 28caccf7818fb3ed5a38caef7f77161b1678aa9b8fd12c2d1e76032f409f0d33c40f7ac91e0c8d908df4a44fd01cf97d657a08bae50c6ff17d07f5b2e20c3a6e
2017-07-21[QA] Avoid running multiwallet.py twiceJonas Schnelli
2017-07-20[wallet] [tests] Add listwallets to multiwallet testJohn Newbery
2017-07-17[QA] add basic multiwallet testJonas Schnelli
2017-07-11Merge #10190: [tests] mining functional tests (including regression test for ↵Wladimir J. van der Laan
submitblock) 11ba8e9 [tests] rename getblocktemplate_proposals.py to mining.py (John Newbery) b29dd41 [tests] add test for submit block (John Newbery) 9bf0d80 [tests] run successful test in getblocktemplate first (John Newbery) 82dc597 [tests] don't build blocks manually in getblocktemplate test (John Newbery) f82c709 [tests] clarify assertions in getblocktemplate test (John Newbery) 66c570a [tests] Don't build the coinbase manually in getblocktemplate test (John Newbery) 38b38cd [tests] getblocktemplate_proposals.py: add logging (John Newbery) 0a3a5ff [tests] Fix flake8 warnings in getblocktemplate tests (John Newbery) 32cffe6 [tests] Fix import order in getblocktemplate test (John Newbery) Tree-SHA512: a51a57314fa1c4c4b8a7896492ec6e677b6bed12387060def34a62e9dfbee7961f71bb5553fbd70028be61ae32eccf13fd255fa9651f908e9a5e64c28f43f00e
2017-07-06[qa] Rewrite BIP66 functional testsSuhas Daftuar
Rewrite the BIP66 functional tests to reflect height-based activation, and move it out of the extended test suite. Remove the unnecessary bipdersig.py test
2017-07-01Fix MD formatting in REST-interface.md and spelling mistake inMeshCollider
test_runner.py
2017-06-30[qa] Rewrite BIP65 functional testsSuhas Daftuar
After 122786d0e0170c73536360b705af711e1338adbf, BIP65 activates at a particular height (without regard to version numbers of blocks below that height). Rewrite the BIP65 functional tests to take this into account, and add a test case that exercises OP_CHECKLOCKTIMEVERIFY in a block where the soft-fork is active. Also moves the bip65 functional test out of the extended test suite.
2017-06-29[tests] Allow tests to pass when stderr is non-emptyJonas Schnelli
Tests which pass with non-empty stderr are reported as "passed with warnings"
2017-06-28Merge #10148: Use non-atomic flushing with block replayWladimir J. van der Laan
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar) d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo) eaca1b7 Random db flush crash simulator (Pieter Wuille) 0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille) 013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille) b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille) Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-27[tests] rename getblocktemplate_proposals.py to mining.pyJohn Newbery
2017-06-27Merge #10612: The young person's guide to the test_frameworkWladimir J. van der Laan
e7ba6c1 [tests] add example test (John Newbery) 76859e6 [tests] Update functional tests documentation (John Newbery) Tree-SHA512: 74eb464e965e16466f95b9eda7d1e89a31ef1ef204dd30e1b11ddf482336f12f33fa5ca3cc733b6eaf440c46401e663585af9caca202deddb440bbadce964a62
2017-06-27[tests] add example testJohn Newbery
2017-06-26[qa] Test non-atomic chainstate writesSuhas Daftuar
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the logic for recovering from a crash during chainstate flush. dbcrash.py is added to the extended tests, as it may take ~10 minutes to run Use _Exit() instead of exit() for crash simulation This eliminates stderr output such as: terminate called without an active exception or Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104. Eliminating the stderr output on crash simulation allows testing with test_runner.py, which reports a test as failed if stderr is produced.
2017-06-25[RPC] Add an uptime command that displays the amount of time that bitcoind ↵Ricardo Velhote
has been running
2017-06-18Merge #10555: [tests] various improvements to zmq_test.pyMarcoFalke
0a4912e [tests] timeout integration tests on travis after 20 minutes (John Newbery) 7c51e9f [tests] destroy zmq context in zmq_tests.py (John Newbery) b1bac1c [tests] in zmq test, timeout if message not received (John Newbery) 5ebd5f9 [tests] tidy up zmq_test.py (John Newbery) 4a0c08f [tests] update zmq test to use correct config.ini file (John Newbery) Tree-SHA512: 5e607af2f2dc5c73fba4b2d3890097580a7525f6a4996c7c78f01822e45e0054fd0a225ea53fce6308804e560cced6de6cf5d16137469dcf100b2e9643e08d03
2017-06-12[tests] timeout integration tests on travis after 20 minutesJohn Newbery
2017-06-08[tests] tidy up zmq_test.pyJohn Newbery
2017-06-08Tests for wallet encryption stuffAndrew Chow
Added a functional test which tests the encryptwallet, walletpassphrase, walletpassphrasechange, and walletlock RPCs
2017-06-06Merge #10331: Share config between util and functional testsMarcoFalke
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery) 95836c5 Use shared config file for functional and util tests (John Newbery) 89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery) e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery) ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery) Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f