Commit Graph

14507 Commits

Author SHA1 Message Date
Alex Morcos 3accdb2fc7 Reorder RPC tests for running time 2020-11-21 03:03:15 +00:00
MarcoFalke 8b3c39ea80 [qa] rpc-tests: Apply random offset to portseed
This helps to skip over resources, which are blocked by regtest bitcoind
zombie nodes
2020-11-21 03:03:15 +00:00
MarcoFalke 0a73a0fbd9 [qa] test_framework: Exit when tmpdir exists 2020-11-21 03:03:15 +00:00
MarcoFalke d014a30566 [qa] pull-tester: Only print output when failed 2020-11-21 03:03:15 +00:00
MarcoFalke bcbf03ebe9 [qa] Refactor RPCTestHandler to prevent TimeoutExpired 2020-11-21 03:03:15 +00:00
MarcoFalke 352f2dc54b [qa] create_cache: Delete temp dir when done 2020-11-21 03:03:15 +00:00
isle2983 2d90c8f0d8 [doc] - clarify statement about parallel jobs in rpc-tests.py 2020-11-21 03:03:12 +00:00
MarcoFalke 4500a75346 [qa] pull-tester: Don't mute zmq ImportError
Zcash: We didn't backport the mute, so this is just conflict removal.
2020-11-21 03:02:41 +00:00
MarcoFalke e4d1dcc753 [qa] Remove unused code 2020-11-21 03:02:41 +00:00
MarcoFalke b25a63593e [qa] Use single cache dir for chains 2020-11-21 03:02:41 +00:00
MarcoFalke dbb41d1082 [qa] Adjust timeouts for micro-optimization of run time 2020-11-21 03:02:41 +00:00
whythat 1b3866fd0e [qa]: enable rpcbind_test 2020-11-21 03:02:41 +00:00
whythat 3c7f4ca809 [qa]: add parsing for '<host>:<port>' argument form to rpc_url() 2020-11-21 03:02:41 +00:00
fanquake 2fc450d94e [doc] Add OS X ZMQ requirement to QA readme 2020-11-21 03:02:37 +00:00
MarcoFalke 7366e81375 [qa] pull-tester: Start longest test first 2020-11-21 02:34:47 +00:00
MarcoFalke fd7689ff07 [qa] pull-tester: Fix assertion and check for run_parallel 2020-11-21 02:34:47 +00:00
MarcoFalke 63a3c9aceb [qa] test_framework: Use different rpc_auth_pair for each node 2020-11-21 02:34:47 +00:00
Cory Fields ecf9d8eb2b build: a few ugly hacks to get the rpc tests working out-of-tree
- Link pull-tester/rpc-tests.py to the build dir
- Add the build-dir's config to the python path so that tests can find it
- The tests themselves are in srcdir
- Clean up __pycache__ in 'make clean'
2020-11-21 02:34:47 +00:00
Suhas Daftuar 2399cfc7ba Tests: add timeout to sync_blocks() and sync_mempools()
Previously these functions would infinitely loop if sync failed;
now they have a default timeout of 60 seconds, after which an
AssertionError is raised.

sync_blocks() has also been improved and now compares the tip
hash of each node, rather than just using block count.

Zcash: Kept block count check for a couple of tests where we use it.
2020-11-21 02:34:47 +00:00
MarcoFalke 17caf1ddd1 [qa] test_framework: Append portseed to tmpdir
This makes it possible to specify a tmpdir while running tests in
parallel
2020-11-21 02:34:47 +00:00
MarcoFalke 818d2de39b [qa] Remove hardcoded "4 nodes" from test_framework
Zcash: Applied changes to our RPC tests.
2020-11-21 02:34:47 +00:00
MarcoFalke 5a12bc9d83 [qa] Add option --portseed to test_framework 2020-11-21 02:33:27 +00:00
MarcoFalke cbe91ea855 [qa] pull-tester: Run rpc test in parallel 2020-11-21 02:33:27 +00:00
MarcoFalke 0d8a62925a [qa] pull-tester: Adjust comment 2020-11-21 02:33:27 +00:00
MarcoFalke 5f13446dee [qa] Stop other nodes, even when one fails to stop 2020-11-21 02:33:27 +00:00
MarcoFalke 065255d3cb [qa] Update README.md 2020-11-21 02:33:27 +00:00
MarcoFalke 08256c9ec6 [qa] Refactor test_framework and pull tester
* log to stdout
* increase range for p2p and rpc ports
* UPPERCASE_CONSTANTS
* Stop nodes on CTRL+C
2020-11-21 02:33:27 +00:00
MarcoFalke 15721275d0 [qa] Switch to py3
Zcash: We already did this, so most of the backported changes are
ancillary (license header updates and style), but a few are relevant.
2020-11-21 02:33:27 +00:00
MarcoFalke d362b632bf [qa] rpc-tests: Fix link in comment and label error msg 2020-11-21 02:33:27 +00:00
MarcoFalke cc44368315 [qa] pull-tester: Exit early when no tests are run 2020-11-21 02:33:27 +00:00
MarcoFalke e7a6c49c00 [qa] pull-tester: Don't mute zmq ImportError 2020-11-21 02:33:27 +00:00
MarcoFalke db761077e5 [qa] mininode: Catch exceptions in got_data 2020-11-21 02:33:27 +00:00
MarcoFalke 7108d6aaa6 [qa] rpc-tests: Properly use integers, floats 2020-11-21 02:33:27 +00:00
MarcoFalke 65a6249d41 [qa] Use python2/3 syntax 2020-11-21 02:33:27 +00:00
Elliot Olds 845b31a760 Check if zmq is installed in tests, update docs
If ZMQ is enabled, check whether it's installed before running ZMQ tests.
If it isn't, disable ZMQ and print a warning.

Also add dependency info to test docs, so users know ZMQ is required
before running tests, and so they know how to install it.

When following the build instructions before this change then trying
to run the RPC tests, a unix user would get an error when python
tried to import zmq.

There may be other dependencies that should be added to the docs,
particularly ones for non-unix systems. This is the only unlisted
dependency I encountered using linux.
2020-11-21 02:33:27 +00:00
Wladimir J. van der Laan 239857d7d9 test: don't override BITCOIND and BITCOINCLI if they're set
In rpc-tests.py, don't override BITCOIND and BITCOINCLI if they're
already set. Makes it possible to run the tests with either another tree
or the GUI.
2020-11-21 02:33:27 +00:00
MarcoFalke fb1f76f330 [qa] pull-tester: Cleanup (run keypool, tidy stdout)
* Run keypool (takes 6 seconds)
* Print duration of each rpc test
* Structure output (bold, new lines)
2020-11-21 02:33:27 +00:00
MarcoFalke db27db2e43 [qa] keypool: DRY: Use test framework 2020-11-21 02:33:27 +00:00
MarcoFalke fa44509d6c [qa] keypool: Fix white space to prepare transition to test framework 2020-11-21 02:33:27 +00:00
MarcoFalke 01c36295c4 [qa] Extend README.md 2020-11-21 02:33:27 +00:00
MarcoFalke 80b2274ddf [qa] Split README.md to /qa and /qa/rpc-tests
+ Update with new -help message
2020-11-21 02:33:27 +00:00
Suhas Daftuar 800bf0a45f Remove unmaintained example test script_test.py 2020-11-21 02:33:27 +00:00
James O'Beirne eaf4dfe280 Add basic coverage reporting for RPC tests
Thanks to @MarcoFalke @dexX7 @laanwj for review.

Zcash: Just the --coverage flag for rpc-tests.py, as we backported the
rest of the coverage backend in zcash/zcash#4411.
2020-11-21 02:33:27 +00:00
Wladimir J. van der Laan 5832635532 build: don't distribute tests_config.py
This file is dynamically generated by configure based on the platform,
it doesn't belong in the distribution archive.

Fixes #6929.
2020-11-21 02:33:27 +00:00
MarcoFalke 760e500811 [rpc-tests] Check return code 2020-11-20 03:32:53 +00:00
MarcoFalke 6aa4f19e87 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase
Zcash: Added floor, since our minRelayTxFee is actually lower.
2020-11-20 03:32:53 +00:00
James O'Beirne 480f1bf43e Add tests for gettxoutsetinfo, CLevelDBBatch, CLevelDBIterator
Thanks @dexX7.

Zcash: Rest of this commit was cherry-picked in zcash/zcash#2598.
2020-11-20 03:32:53 +00:00
MarcoFalke 8e58eddab1 [doc] trivial: fix markdown syntax in qa/rpc-tests/README.md 2020-11-20 03:32:53 +00:00
Jeff Garzik 6618580194 qa/pull-tester/rpc-tests.py: chmod 0755
Fix file mode to be executable.

Include dummy whitespace change to force git to change mode.
2020-11-20 03:32:53 +00:00
ptschip 772d780730 Migrated rpc-tests.sh to all python rpc-tests.py
1) created rpc-tests.py
2) deleted rpc-tests.sh
3) travis.yml points to rpc-tests.py
4) Modified Makefile.am
5) Updated README.md
6) Added tests_config.py and deleted tests-config.sh
7) Modified configure.ac with script to set correct path in tests_config.py

Zcash: Migrated our test list over, and other necessary modifications.
The UI changes were not migrated.
2020-11-20 03:32:53 +00:00