mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Rename rpc-tests directory to functional
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
The [pull-tester](/test/pull-tester/) folder contains a script to call
|
||||
multiple tests from the [rpc-tests](/test/rpc-tests/) folder.
|
||||
multiple tests from the [functional](/test/functional/) folder.
|
||||
|
||||
Every pull request to the bitcoin repository is built and run through
|
||||
the regression test suite. You can also run all or only individual
|
||||
@@ -83,5 +83,5 @@ killall bitcoind
|
||||
Writing tests
|
||||
=============
|
||||
You are encouraged to write tests for new or existing features.
|
||||
Further information about the test framework and individual RPC
|
||||
tests is found in [test/rpc-tests](/test/rpc-tests).
|
||||
Further information about the test framework and individual functional
|
||||
tests is found in [test/functional](/test/functional).
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"""Create a blockchain cache.
|
||||
|
||||
Creating a cache of the blockchain speeds up test execution when running
|
||||
multiple qa tests. This helper script is executed by rpc-tests when multiple
|
||||
multiple functional tests. This helper script is executed by rpc-tests when multiple
|
||||
tests are being run in parallel.
|
||||
"""
|
||||
|
||||
@@ -8,7 +8,7 @@ rpc-tests.py - run regression test suite
|
||||
This module calls down into individual test cases via subprocess. It will
|
||||
forward all unrecognized arguments onto the individual test scripts.
|
||||
|
||||
RPC tests are disabled on Windows by default. Use --force to run them anyway.
|
||||
Functional tests are disabled on Windows by default. Use --force to run them anyway.
|
||||
|
||||
For a description of arguments recognized by test scripts, see
|
||||
`test/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`.
|
||||
@@ -161,7 +161,7 @@ def main():
|
||||
sys.exit(0)
|
||||
|
||||
if not (enable_wallet and enable_utils and enable_bitcoind):
|
||||
print("No rpc tests to run. Wallet, utils, and bitcoind must all be enabled")
|
||||
print("No functional tests to run. Wallet, utils, and bitcoind must all be enabled")
|
||||
print("Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make")
|
||||
sys.exit(0)
|
||||
|
||||
@@ -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"] + '/test/rpc-tests/' + test_list[0]).split() + ['-h'])
|
||||
subprocess.check_call((config["environment"]["SRCDIR"] + '/test/functional/' + 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,7 +222,7 @@ 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 + '/test/rpc-tests/'
|
||||
tests_dir = src_dir + '/test/functional/'
|
||||
|
||||
flags = ["--srcdir={}/src".format(build_dir)] + args
|
||||
flags.append("--cachedir=%s/test/cache" % build_dir)
|
||||
@@ -243,7 +243,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
|
||||
time_sum = 0
|
||||
time0 = time.time()
|
||||
|
||||
job_queue = RPCTestHandler(jobs, tests_dir, test_list, flags)
|
||||
job_queue = TestHandler(jobs, tests_dir, test_list, flags)
|
||||
|
||||
max_len_name = len(max(test_list, key=len))
|
||||
results = BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "PASSED", "DURATION") + BOLD[0]
|
||||
@@ -271,7 +271,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
|
||||
|
||||
sys.exit(not all_passed)
|
||||
|
||||
class RPCTestHandler:
|
||||
class TestHandler:
|
||||
"""
|
||||
Trigger the testscrips passed in via the list.
|
||||
"""
|
||||
@@ -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: test/rpc-tests/test_framework/coverage.py
|
||||
See also: test/functional/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 `test/rpc-tests/test-framework/coverage.py`
|
||||
# This is shared from `test/functional/test-framework/coverage.py`
|
||||
reference_filename = 'rpc_interface.txt'
|
||||
coverage_file_prefix = 'coverage.'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user