Commit graph

17 commits

Author SHA1 Message Date
1a896d9af9
update copyright dates 2022-01-04 19:51:22 +00:00
d70f3a7c1f
minor fixes and cleanups 2021-10-10 20:18:14 +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
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
ea5eedcff3
minor changes, whitespace 2021-10-02 17:54:11 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
e91b139c99
test.py: begin implementing TEST_SUITE_DETERMINISTIC 2021-09-29 21:17:56 +00:00
508069dc48
rpc.py,daemon.py: fixes and cleanups 2021-08-01 20:54:51 +00:00
bab1242817
minor fixes and cleanups 2021-07-29 14:20:44 +00:00
bd97eca7a6
fixes & cleanups throughout 2021-05-14 11:26:32 +00:00
cb7f38370b
Update copyright dates 2021-02-19 20:09:06 +03:00
1ff7f3e5ba
various build and testing fixes 2020-06-27 10:22:01 +00:00
d2055c93da
test.py: allow color for some test groups; minor fixes, cleanups 2020-06-03 12:29:50 +00:00
c3f185e8b0
eliminate use of global vars g.proto, g.coin, g.rpc and others
This patch eliminates nearly all the global variables that changed during the
execution of scripts.  With a few minor exceptions, global vars are now used
only during initialization or reserved for cfg file / cmdline options and other
unchanging values.

The result is a code base that's much more maintainable and extensible and less
error-prone.  The autosigning code, which supports signing of transactions for
multiple protocols and networks, has been greatly simplified.

Doing away with globals required many changes throughout the code base, and
other related (and not so related) changes and cleanups were made along the
way, resulting in an enormous patch.

Additional code changes include:

    - tx.py: complete reorganization of TX classes and use of nesting

    - protocol.py: separation of Regtest and Testnet into distinct subclasses
      with separate address and transaction files and file extensions

    - new module help.py for the help notes, loaded on demand

    - addr.py: rewrite of the address file label parsing code

    - tx.py,tw.py: use of generators to create formatted text

User-visible changes include:

    - importing of addresses for tokens not yet in the user's tracking wallet
      is now performed with the `--token-addr` option instead of `--token`

Testing:

    Testing this patch requires a full run of the test suite as described on the
    Test-Suite wiki page.
2020-05-28 09:53:34 +00:00
57f12cd1cb
minor changes and fixes throughout 2020-05-10 13:39:53 +00:00
de7fba0c19
test suite: relocate some modules, use relative imports 2020-03-16 10:45:00 +00:00
Renamed from test/common.py (Browse further)