mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-05 05:14:51 +02:00
Rename test/pull-tester/rpc-tests.py to test/functional/test_runner.py
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 [functional](/test/functional/) folder.
|
||||
The [functional](/test/functional/) folder contains a script test_runner
|
||||
to call multiple functional tests from its 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
|
||||
@@ -27,19 +27,19 @@ Running tests
|
||||
|
||||
You can run any single test by calling
|
||||
|
||||
test/pull-tester/rpc-tests.py <testname>
|
||||
test/functional/test_runner.py <testname>
|
||||
|
||||
Or you can run any combination of tests by calling
|
||||
|
||||
test/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...
|
||||
test/functional/test_runner.py <testname1> <testname2> <testname3> ...
|
||||
|
||||
Run the regression test suite with
|
||||
|
||||
test/pull-tester/rpc-tests.py
|
||||
test/functional/test_runner.py
|
||||
|
||||
Run all possible tests with
|
||||
|
||||
test/pull-tester/rpc-tests.py --extended
|
||||
test/functional/test_runner.py --extended
|
||||
|
||||
By default, tests will be run in parallel. To specify how many jobs to run,
|
||||
append `--jobs=n` (default n=4).
|
||||
@@ -61,7 +61,7 @@ Possible options, which apply to each individual test run:
|
||||
```
|
||||
|
||||
If you set the environment variable `PYTHON_DEBUG=1` you will get some debug
|
||||
output (example: `PYTHON_DEBUG=1 test/pull-tester/rpc-tests.py wallet`).
|
||||
output (example: `PYTHON_DEBUG=1 test/functional/test_runner.py wallet`).
|
||||
|
||||
A 200-block -regtest blockchain and wallets for four nodes
|
||||
is created the first time a regression test is run and
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# These environment variables are set by the build process and read by
|
||||
# rpc-tests.py
|
||||
# test/functional/test_runner.py
|
||||
|
||||
[environment]
|
||||
SRCDIR=@abs_top_srcdir@
|
||||
@@ -5,7 +5,7 @@
|
||||
"""Create a blockchain cache.
|
||||
|
||||
Creating a cache of the blockchain speeds up test execution when running
|
||||
multiple functional tests. This helper script is executed by rpc-tests when multiple
|
||||
multiple functional tests. This helper script is executed by test_runner when multiple
|
||||
tests are being run in parallel.
|
||||
"""
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
# Copyright (c) 2014-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""
|
||||
rpc-tests.py - run regression test suite
|
||||
"""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.
|
||||
@@ -11,7 +10,7 @@ forward all unrecognized arguments onto the individual test scripts.
|
||||
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`.
|
||||
`test/functional/test_framework/test_framework.py:BitcoinTestFramework.main`.
|
||||
|
||||
"""
|
||||
|
||||
@@ -87,7 +86,7 @@ BASE_SCRIPTS= [
|
||||
|
||||
ZMQ_SCRIPTS = [
|
||||
# ZMQ test can only be run if bitcoin was built with zmq-enabled.
|
||||
# call rpc_tests.py with -nozmq to explicitly exclude these tests.
|
||||
# call test_runner.py with -nozmq to explicitly exclude these tests.
|
||||
"zmq_test.py"]
|
||||
|
||||
EXTENDED_SCRIPTS = [
|
||||
@@ -127,7 +126,7 @@ ALL_SCRIPTS = BASE_SCRIPTS + ZMQ_SCRIPTS + EXTENDED_SCRIPTS
|
||||
def main():
|
||||
# Parse arguments and pass through unrecognised args
|
||||
parser = argparse.ArgumentParser(add_help=False,
|
||||
usage='%(prog)s [rpc-test.py options] [script options] [scripts]',
|
||||
usage='%(prog)s [test_runner.py options] [script options] [scripts]',
|
||||
description=__doc__,
|
||||
epilog='''
|
||||
Help text and arguments for individual test script:''',
|
||||
@@ -147,7 +146,7 @@ def main():
|
||||
|
||||
# Read config generated by configure.
|
||||
config = configparser.ConfigParser()
|
||||
config.read_file(open(os.path.dirname(__file__) + "/tests_config.ini"))
|
||||
config.read_file(open(os.path.dirname(__file__) + "/config.ini"))
|
||||
|
||||
enable_wallet = config["components"].getboolean("ENABLE_WALLET")
|
||||
enable_utils = config["components"].getboolean("ENABLE_UTILS")
|
||||
@@ -200,11 +199,11 @@ def main():
|
||||
|
||||
if not test_list:
|
||||
print("No valid test scripts specified. Check that your test is in one "
|
||||
"of the test lists in rpc-tests.py, or run rpc-tests.py with no arguments to run all tests")
|
||||
"of the test lists in test_runner.py, or run test_runner.py with no arguments to run all tests")
|
||||
sys.exit(0)
|
||||
|
||||
if args.help:
|
||||
# Print help for rpc-tests.py, then print help of the first script and exit.
|
||||
# Print help for test_runner.py, then print help of the first script and exit.
|
||||
parser.print_help()
|
||||
subprocess.check_call((config["environment"]["SRCDIR"] + '/test/functional/' + test_list[0]).split() + ['-h'])
|
||||
sys.exit(0)
|
||||
@@ -325,7 +324,7 @@ class TestHandler:
|
||||
|
||||
class RPCCoverage(object):
|
||||
"""
|
||||
Coverage reporting utilities for pull-tester.
|
||||
Coverage reporting utilities for test_runner.
|
||||
|
||||
Coverage calculation works by having each test script subprocess write
|
||||
coverage files into a particular directory. These files contain the RPC
|
||||
Reference in New Issue
Block a user