Commit graph

3,143 commits

Author SHA1 Message Date
59aed3431b
tw.py: insert existing label text when editing label 2021-10-07 13:12:10 +00:00
f377c63a39
line_input(): skip readline text insert if 'insert_txt' is empty 2021-10-07 13:12:09 +00:00
1245dc1026
my_raw_input() -> line_input() 2021-10-07 13:12:09 +00:00
fb29994067
my_raw_input(): improve readline initialization 2021-10-06 21:08:03 +00:00
acd9c1e13f
minor fixes and cleanups 2021-10-06 21:08:02 +00:00
8e739e787a
test.py regtest: enable deterministic testing
Follow-up to commit 08fc25d86

Testing:

    $ export MMGEN_TEST_SUITE_DETERMINISTIC=1
    $ script -c 'test/test.py -ne regtest' -O run1
    $ script -c 'test/test.py -ne regtest' -O run2
    $ scripts/gendiff.py run1 run2 > run.diff

Erratum:

    The phrase “and the non-deterministic behavior of Bitcoin Core’s regtest
    implementation” in the notes to commit 08fc25d86 is incorrect and should
    be disregarded.
2021-10-06 13:22:34 +00:00
76cf32f3b4
new convenience utility: scripts/gendiff.py 2021-10-06 13:22:34 +00:00
ae0618ad01
rpc.py: get regtest credentials from CoinDaemon 2021-10-06 13:22:34 +00:00
d99c75216d
minor fixes and cleanups 2021-10-06 13:22:33 +00:00
f64be2b883
txsign: support all address types with flat keylist 2021-10-06 13:22:33 +00:00
ede56a2526
tx.py: infer mmtype for non-MMGen inputs and outputs 2021-10-06 13:22:32 +00:00
fb046dc076
minor cleanups 2021-10-06 13:22:32 +00:00
36c6021ce2
regtest: create miner wallet from hardcoded seed (BTC-only) 2021-10-05 11:57:34 +00:00
b0644a4052
regtest: make cli accept integer and bool args, add wallet_cli 2021-10-05 11:57:34 +00:00
554670b713
overlay_setup(): use passed value of repo_root 2021-10-05 11:57:34 +00:00
2af674a4ce
CoinDaemon: include non-standard --datadir for BCH 2021-10-05 11:57:33 +00:00
ae3c65ec81
regtest: return daemon datadir to its former location under MMGen datadir
Affected coins: BTC,LTC,BCH

Fixes a regression introduced by commit `ca8b4dc31` on Aug 5.

During this period, use of the `mmgen-regtest` script would have overwritten
the user bitcoin/litecoin.conf and regtest dir.  Other files in the daemon
datadir were unaffected.
2021-10-05 11:57:33 +00:00
4dc9b38041
daemon.py: restrict start() and stop() methods to test suite and regtest 2021-10-05 11:57:33 +00:00
517f0ee54f
daemon.py: minor fixes and cleanups 2021-10-05 11:57:32 +00:00
08fc25d863
deterministic testing
Goal: for each test run to produce reproducible output, allowing us to check
for possible stochastic behavior in the scripts, as well as output-related
regressions (for example, garbage or improperly formatted output produced by a
bad format string) that might not be detected by the test scripts.

In practice, bugginess of the pexpect module and the non-deterministic behavior
of Bitcoin Core’s regtest implementation preclude completely identical output
from test run to test run, but the differences are small enough to result in an
easily reviewable diff.

Enable this feature by setting the MMGEN_TEST_SUITE_DETERMINISTIC environment
variable or running test/test-release.sh with the -D switch.

Examples:

    $ script -c 'test/test-release.sh -FDv quick' -O run1
    $ script -c 'test/test-release.sh -FDv quick' -O run2
    # (optionally remove control characters from output files)
    $ diff -u run1 run2 > diff

    $ export MMGEN_TEST_SUITE_DETERMINISTIC=1
    $ script -c 'test/test.py -ne main' -O run1
    $ script -c 'test/test.py -ne main' -O run2
    # (optionally remove control characters from output files)
    $ diff -u run1 run2 > diff
2021-10-03 17:40:03 +00:00
96a250b51d
test suite: run scripts from overlay tree
Rationale of this commit: to relocate some ugly test-related code from the MMGen
package tree to the test tree, as well as to enable deterministic testing
(implemented in the next commit).

The overlay tree is a symlinked mirror of the MMGen package dir with a few
monkey-patched modules.

The monkey-patching is conditional, so the modules are certain to get tested in
their unpatched state as well.
2021-10-03 17:40:02 +00:00
2a178b3b2e
tx.py: format_io(): add amount to sort key so duplicate addrs sort predictably 2021-10-03 17:40:02 +00:00
3a2cb6f551
minor fixes and cleanups 2021-10-03 17:40:02 +00:00
54d123fdc0
scripts/traceback_run.py -> scripts/exec_wrapper.py 2021-10-03 17:40:01 +00:00
ca3ff726ef
test-release.sh: skip individual tests with -S 2021-10-02 17:54:12 +00:00
0493f8077b
test suite: use getrand() instead of os.urandom() 2021-10-02 17:54:12 +00:00
ffa6d44834
test suite: add end_msg() 2021-10-02 17:54:11 +00:00
e957b84def
init_color(): allow disabling of color with num_colors=0 2021-10-02 17:54:11 +00:00
ea5eedcff3
minor changes, whitespace 2021-10-02 17:54:11 +00:00
579226ee7d
AddrList: display checksum only where relevant 2021-10-02 17:54:10 +00:00
8c45829682
add remove_dups() function, use lists instead of sets to preserve order 2021-10-02 17:54:10 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
2872d4b683
f-strings, whitespace (program files) [43 files patched] 2021-09-29 21:17:56 +00:00
a093075fd5
test.py: add --no-timings option 2021-09-29 21:17:56 +00:00
e91b139c99
test.py: begin implementing TEST_SUITE_DETERMINISTIC 2021-09-29 21:17:56 +00:00
565dd6da62
scripts/traceback_run.py: improve color initialization code 2021-09-29 21:17:55 +00:00
fe756f7303
minor test suite fixes 2021-09-29 21:17:55 +00:00
c82eb9d149
setup.py,setup.cfg: Windows build fixes 2021-09-26 21:16:55 +00:00
eccc48b37f
minor fixes and cleanups 2021-09-26 21:16:55 +00:00
877be3f877
test.py ethdev: support Erigon (WIP) 2021-09-26 21:16:54 +00:00
db4c0158fb
test.py: clean tmpdirs before initializing test groups 2021-09-26 21:16:54 +00:00
229107a8a9
CoinProtocol.Ethereum: generate checksummed addresses 2021-09-26 21:16:21 +00:00
395d3c1a20
test.py: whitespace, remove 'non_mmgen_inputs' parameter 2021-09-26 21:16:20 +00:00
50d8fc8422
test.py ethdev: variable renames 2021-09-26 21:16:20 +00:00
b400b26029
test suite: improve handling of BOGUS_SEND environment var 2021-09-26 21:16:20 +00:00
4c35218fc2
unit_tests.py: new testdep test 2021-09-26 21:16:20 +00:00
cd7e6595ea
unit_tests.py: new 'win_skip' attribute 2021-09-26 21:16:19 +00:00
e9b0c9e325
unit_tests.py daemon: refactor to use subtest API 2021-09-26 21:16:19 +00:00
5afa3f5118
ts_main.py: f-strings 2021-09-26 21:16:19 +00:00
d75ffea985
test suite: whitespace 2021-09-26 21:16:18 +00:00