- 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'
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.
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.
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.
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.
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.
Since the introduction of the ScriptForMining callback, the mining
functions (setgenerate and generate) crash with an assertion failure
(due to a NULL pointer script returned) if the keypool is empty. Fix
this by giving a proper error.
Zcash: Adapted to our MinerAddress type.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
configure.ac: Introduce macros to simplify requiring tools.
## what
Introduce two `ZC_REQUIRE_(PROG|TOOL)` macros that are like `AC_PATH_(PROG|TOOL)` except they immediately error out if the target program is not detected.
Then require almost all programs, except for two known optional cases: three programs required only if `--with-lcov` is given, and then `ccache` which has exceptional logic (The equivalent of "--enable-ccache=auto" by default, with explicit 'yes' or 'no' possible, each with different detection needs.)
## why
Provide early explicit errors for build misconfigurations. Hopefully this should never hit our "standard official flow" which relies on the `./zcutil/build.sh` path, though it may come into play for anyone experimenting with the build system or altering dependencies.
### background motivation
While prototyping a nix build system I didn't provide the `cargo` program to the `zcashd` build process. `./configure` happily exited with a success value, but the build system was instantiated with the `CARGO` make / shell variable set to the empty string, which lead to a strange command execution where a long command of `… $CARGO build …` became `… build …`, so bash looked for a program named `build`. I spent a bit too long looking for where "build" was defined in our dependencies. 😆
test: Use default shielded address in RPC tests where the type is irrelevant
This means we are running these tests against the recommended functionality,
and that these RPC tests will now use the faster Sapling addresses.
Improving asyncOp_sendmany redundancies (first round)
Work over async sendmany operation flow. Specifically on the utxo finding, utxo selection, total amount calculation and the tx inputs appending process. Removed several unneeded for loops over the entire utxo set, re structuring and cleaning the flow.