diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -80,8 +80,7 @@ - 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 test/pull-tester/rpc-tests.py --coverage; fi - - set +e + - if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py --coverage; fi after_script: - echo $TRAVIS_COMMIT_RANGE - echo $TRAVIS_COMMIT_LOG diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -201,7 +201,7 @@ $(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 @@ -229,7 +229,7 @@ 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) @@ -239,4 +239,4 @@ 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__ diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1232,9 +1232,9 @@ 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. diff --git a/contrib/rpm/bitcoin.spec b/contrib/rpm/bitcoin.spec --- a/contrib/rpm/bitcoin.spec +++ b/contrib/rpm/bitcoin.spec @@ -314,7 +314,7 @@ 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 diff --git a/test/README.md b/test/README.md --- a/test/README.md +++ b/test/README.md @@ -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 @@ You can run any single test by calling - test/pull-tester/rpc-tests.py + test/functional/test_runner.py Or you can run any combination of tests by calling - test/pull-tester/rpc-tests.py ... + test/functional/test_runner.py ... 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 `-parallel=n` (default n=4). @@ -71,7 +71,7 @@ ``` 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 diff --git a/test/pull-tester/tests_config.ini.in b/test/functional/config.ini.in rename from test/pull-tester/tests_config.ini.in rename to test/functional/config.ini.in --- a/test/pull-tester/tests_config.ini.in +++ b/test/functional/config.ini.in @@ -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@ diff --git a/test/functional/create_cache.py b/test/functional/create_cache.py --- a/test/functional/create_cache.py +++ b/test/functional/create_cache.py @@ -5,7 +5,7 @@ """ 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. """ diff --git a/test/pull-tester/rpc-tests.py b/test/functional/test_runner.py rename from test/pull-tester/rpc-tests.py rename to test/functional/test_runner.py --- a/test/pull-tester/rpc-tests.py +++ b/test/functional/test_runner.py @@ -3,8 +3,7 @@ # Copyright (c) 2017 The Bitcoin 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. @@ -12,7 +11,7 @@ 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`. """ @@ -99,7 +98,7 @@ 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 = [ @@ -138,7 +137,7 @@ 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:''', @@ -165,7 +164,7 @@ # 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") @@ -220,11 +219,11 @@ 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']) @@ -354,7 +353,7 @@ 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