Browse Source

Rename test/pull-tester/rpc-tests.py to test/functional/test_runner.py

0.15
John Newbery 8 years ago
parent
commit
a9bd622a65
  1. 2
      .travis.yml
  2. 6
      Makefile.am
  3. 2
      README.md
  4. 4
      configure.ac
  5. 2
      contrib/rpm/bitcoin.spec
  6. 14
      test/README.md
  7. 2
      test/functional/config.ini.in
  8. 2
      test/functional/create_cache.py
  9. 17
      test/functional/test_runner.py

2
.travis.yml

@ -70,7 +70,7 @@ script: @@ -70,7 +70,7 @@ script:
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
- if [ "$RUN_TESTS" = "true" ]; then functional/pull-tester/rpc-tests.py --coverage; fi
- if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py --coverage; fi
after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG

6
Makefile.am

@ -195,7 +195,7 @@ test_bitcoin_filtered.info: test_bitcoin.info @@ -195,7 +195,7 @@ test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" -o $@
functional_test.info: test_bitcoin_filtered.info
-@TIMEOUT=15 python test/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS)
-@TIMEOUT=15 python test/functional/test_runner.py $(EXTENDED_RPC_TESTS)
$(LCOV) -c -d $(abs_builddir)/src --t functional-tests -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
@ -223,7 +223,7 @@ endif @@ -223,7 +223,7 @@ endif
dist_noinst_SCRIPTS = autogen.sh
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/pull-tester/rpc-tests.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
@ -233,4 +233,4 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man @@ -233,4 +233,4 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man
clean-local:
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
rm -rf test/pull-tester/__pycache__
rm -rf test/functional/__pycache__

2
README.md

@ -56,7 +56,7 @@ and extending unit tests can be found in [/src/test/README.md](/src/test/README. @@ -56,7 +56,7 @@ and extending unit tests can be found in [/src/test/README.md](/src/test/README.
There are also [regression and integration tests](/test), written
in Python, that are run automatically on the build server.
These tests can be run (if the [test dependencies](/test) are installed) with: `test/pull-tester/rpc-tests.py`
These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py`
The Travis CI system makes sure that every pull request is built for Windows, Linux, and OS X, and that unit/sanity tests are run automatically.

4
configure.ac

@ -1147,9 +1147,9 @@ AC_SUBST(EVENT_PTHREADS_LIBS) @@ -1147,9 +1147,9 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py test/pull-tester/tests_config.ini])
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py test/functional/config.ini])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
AC_CONFIG_LINKS([test/pull-tester/rpc-tests.py:test/pull-tester/rpc-tests.py])
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
dnl boost's m4 checks do something really nasty: they export these vars. As a
dnl result, they leak into secp256k1's configure and crazy things happen.

2
contrib/rpm/bitcoin.spec

@ -314,7 +314,7 @@ make check @@ -314,7 +314,7 @@ make check
pushd src
srcdir=. test/bitcoin-util-test.py
popd
test/pull-tester/rpc-tests.py -extended
test/functional/test_runner.py --extended
%post libs -p /sbin/ldconfig

14
test/README.md

@ -1,5 +1,5 @@ @@ -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 @@ -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: @@ -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

2
test/pull-tester/tests_config.ini.in → test/functional/config.ini.in

@ -3,7 +3,7 @@ @@ -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@

2
test/functional/create_cache.py

@ -5,7 +5,7 @@ @@ -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.
"""

17
test/pull-tester/rpc-tests.py → test/functional/test_runner.py

@ -2,8 +2,7 @@ @@ -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. @@ -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= [ @@ -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 @@ -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(): @@ -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(): @@ -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: @@ -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
Loading…
Cancel
Save