|
|
|
@ -11,7 +11,7 @@ forward all unrecognized arguments onto the individual test scripts.
|
|
|
|
|
RPC tests are disabled on Windows by default. Use --force to run them anyway.
|
|
|
|
|
|
|
|
|
|
For a description of arguments recognized by test scripts, see
|
|
|
|
|
`qa/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`.
|
|
|
|
|
`test/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`.
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
@ -171,7 +171,7 @@ def main():
|
|
|
|
|
import zmq
|
|
|
|
|
except ImportError:
|
|
|
|
|
print("ERROR: \"import zmq\" failed. Use -nozmq to run without the ZMQ tests."
|
|
|
|
|
"To run zmq tests, see dependency info in /qa/README.md.")
|
|
|
|
|
"To run zmq tests, see dependency info in /test/README.md.")
|
|
|
|
|
raise
|
|
|
|
|
|
|
|
|
|
# Build list of tests
|
|
|
|
@ -206,7 +206,7 @@ def main():
|
|
|
|
|
if args.help:
|
|
|
|
|
# Print help for rpc-tests.py, then print help of the first script and exit.
|
|
|
|
|
parser.print_help()
|
|
|
|
|
subprocess.check_call((config["environment"]["SRCDIR"] + '/qa/rpc-tests/' + test_list[0]).split() + ['-h'])
|
|
|
|
|
subprocess.check_call((config["environment"]["SRCDIR"] + '/test/rpc-tests/' + test_list[0]).split() + ['-h'])
|
|
|
|
|
sys.exit(0)
|
|
|
|
|
|
|
|
|
|
run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], args.jobs, args.coverage, passon_args)
|
|
|
|
@ -222,10 +222,10 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
|
|
|
|
|
if "BITCOIND" not in os.environ:
|
|
|
|
|
os.environ["BITCOIND"] = build_dir + '/src/bitcoind' + exeext
|
|
|
|
|
|
|
|
|
|
tests_dir = src_dir + '/qa/rpc-tests/'
|
|
|
|
|
tests_dir = src_dir + '/test/rpc-tests/'
|
|
|
|
|
|
|
|
|
|
flags = ["--srcdir={}/src".format(build_dir)] + args
|
|
|
|
|
flags.append("--cachedir=%s/qa/cache" % build_dir)
|
|
|
|
|
flags.append("--cachedir=%s/test/cache" % build_dir)
|
|
|
|
|
|
|
|
|
|
if enable_coverage:
|
|
|
|
|
coverage = RPCCoverage()
|
|
|
|
@ -335,7 +335,7 @@ class RPCCoverage(object):
|
|
|
|
|
After all tests complete, the commands run are combined and diff'd against
|
|
|
|
|
the complete list to calculate uncovered RPC commands.
|
|
|
|
|
|
|
|
|
|
See also: qa/rpc-tests/test_framework/coverage.py
|
|
|
|
|
See also: test/rpc-tests/test_framework/coverage.py
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
def __init__(self):
|
|
|
|
@ -363,7 +363,7 @@ class RPCCoverage(object):
|
|
|
|
|
Return a set of currently untested RPC commands.
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
# This is shared from `qa/rpc-tests/test-framework/coverage.py`
|
|
|
|
|
# This is shared from `test/rpc-tests/test-framework/coverage.py`
|
|
|
|
|
reference_filename = 'rpc_interface.txt'
|
|
|
|
|
coverage_file_prefix = 'coverage.'
|
|
|
|
|
|