[tests] Remove Comparison Test Framework

This commit is contained in:
John Newbery
2017-12-01 13:10:23 -05:00
parent e80c640d78
commit 9c92c8c827
4 changed files with 0 additions and 638 deletions

View File

@@ -89,52 +89,6 @@ thread.)
- Can be used to write tests where specific P2P protocol behavior is tested.
Examples tests are `p2p_unrequested_blocks.py`, `p2p_compactblocks.py`.
#### Comptool
- Comptool is a Testing framework for writing tests that compare the block/tx acceptance
behavior of a bitcoind against 1 or more other bitcoind instances. It should not be used
to write static tests with known outcomes, since that type of test is easier to write and
maintain using the standard BitcoinTestFramework.
- Set the `num_nodes` variable (defined in `ComparisonTestFramework`) to start up
1 or more nodes. If using 1 node, then `--testbinary` can be used as a command line
option to change the bitcoind binary used by the test. If using 2 or more nodes,
then `--refbinary` can be optionally used to change the bitcoind that will be used
on nodes 2 and up.
- Implement a (generator) function called `get_tests()` which yields `TestInstance`s.
Each `TestInstance` consists of:
- A list of `[object, outcome, hash]` entries
* `object` is a `CBlock`, `CTransaction`, or
`CBlockHeader`. `CBlock`'s and `CTransaction`'s are tested for
acceptance. `CBlockHeader`s can be used so that the test runner can deliver
complete headers-chains when requested from the bitcoind, to allow writing
tests where blocks can be delivered out of order but still processed by
headers-first bitcoind's.
* `outcome` is `True`, `False`, or `None`. If `True`
or `False`, the tip is compared with the expected tip -- either the
block passed in, or the hash specified as the optional 3rd entry. If
`None` is specified, then the test will compare all the bitcoind's
being tested to see if they all agree on what the best tip is.
* `hash` is the block hash of the tip to compare against. Optional to
specify; if left out then the hash of the block passed in will be used as
the expected tip. This allows for specifying an expected tip while testing
the handling of either invalid blocks or blocks delivered out of order,
which complete a longer chain.
- `sync_every_block`: `True/False`. If `False`, then all blocks
are inv'ed together, and the test runner waits until the node receives the
last one, and tests only the last block for tip acceptance using the
outcome and specified tip. If `True`, then each block is tested in
sequence and synced (this is slower when processing many blocks).
- `sync_every_transaction`: `True/False`. Analogous to
`sync_every_block`, except if the outcome on the last tx is "None",
then the contents of the entire mempool are compared across all bitcoind
connections. If `True` or `False`, then only the last tx's
acceptance is tested against the given outcome.
- For examples of tests written in this framework, see
`p2p_invalid_block.py` and `feature_block.py`.
### test-framework modules
#### [test_framework/authproxy.py](test_framework/authproxy.py)
@@ -149,15 +103,9 @@ Generally useful functions.
#### [test_framework/mininode.py](test_framework/mininode.py)
Basic code to support P2P connectivity to a bitcoind.
#### [test_framework/comptool.py](test_framework/comptool.py)
Framework for comparison-tool style, P2P tests.
#### [test_framework/script.py](test_framework/script.py)
Utilities for manipulating transaction scripts (originally from python-bitcoinlib)
#### [test_framework/blockstore.py](test_framework/blockstore.py)
Implements disk-backed block and tx storage.
#### [test_framework/key.py](test_framework/key.py)
Wrapper around OpenSSL EC_Key (originally from python-bitcoinlib)