Skip to content

Commit 48e3e95

Browse files
committed
Merge #449: Actually run the bitcoin functional tests with test_runner
e20b836 Actually run the bitcoin functional tests with test_runner (Gregory Sanders) Pull request description: We were just re-running the other tests. Tree-SHA512: 25d7ffada5fc97f1188cdd906b4c36cdb230ef3ec51e9db4fd199902b675db1e91d6595292ccb0b24a094055c13aae3fe076e0cfc9a09b5d718695f27344f96e
2 parents c0d1dbc + e20b836 commit 48e3e95

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ endif
215215

216216
dist_noinst_SCRIPTS = autogen.sh
217217

218-
EXTRA_DIST = $(DIST_SHARE) test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
218+
EXTRA_DIST = $(DIST_SHARE) test/functional/test_runner.py test/functional test/bitcoin_functional/functional test/bitcoin_functional/functional/test_runner.py $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
219219

220220
EXTRA_DIST += \
221221
test/util/bitcoin-util-test.py \

test/bitcoin_functional/functional/test_framework/test_framework.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def main(self):
114114
parser.add_argument("--coveragedir", dest="coveragedir",
115115
help="Write tested RPC commands into this directory")
116116
parser.add_argument("--configfile", dest="configfile",
117-
default=os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/../../config.ini"),
117+
default=os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/../../../config.ini"),
118118
help="Location of the test framework config file (default: %(default)s)")
119119
parser.add_argument("--pdbonfailure", dest="pdbonfailure", default=False, action="store_true",
120120
help="Attach a python debugger if test fails")

test/bitcoin_functional/functional/test_framework/util.py

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def initialize_datadir(dirname, n, chain):
305305
f.write("discover=0\n")
306306
f.write("listenonion=0\n")
307307
f.write("printtoconsole=0\n")
308+
f.write("con_blocksubsidy=5000000000\n")
309+
f.write("con_connect_coinbase=0\n")
308310
os.makedirs(os.path.join(datadir, 'stderr'), exist_ok=True)
309311
os.makedirs(os.path.join(datadir, 'stdout'), exist_ok=True)
310312
return datadir

test/bitcoin_functional/functional/test_runner.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@
153153
'feature_blocksdir.py',
154154
'feature_config_args.py',
155155
'feature_help.py',
156-
'feature_mandatory_coinbase.py',
157156
# Don't append tests at the end to avoid merge conflicts
158157
# Put them in a random line within the section that fits their approximate run-time
159158
]
@@ -286,7 +285,7 @@ def main():
286285
if args.help:
287286
# Print help for test_runner.py, then print help of the first script (with args removed) and exit.
288287
parser.print_help()
289-
subprocess.check_call([sys.executable, os.path.join(config["environment"]["SRCDIR"], 'test', 'functional', test_list[0].split()[0]), '-h'])
288+
subprocess.check_call([sys.executable, os.path.join(config["environment"]["SRCDIR"], 'test', 'bitcoin_functional', 'functional', test_list[0].split()[0]), '-h'])
290289
sys.exit(0)
291290

292291
check_script_list(config["environment"]["SRCDIR"])
@@ -322,7 +321,7 @@ def run_tests(test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=Fal
322321
if os.path.isdir(cache_dir):
323322
print("%sWARNING!%s There is a cache directory here: %s. If tests fail unexpectedly, try deleting the cache directory." % (BOLD[1], BOLD[0], cache_dir))
324323

325-
tests_dir = src_dir + '/test/functional/'
324+
tests_dir = src_dir + '/test/bitcoin_functional/functional/'
326325

327326
flags = ['--cachedir={}'.format(cache_dir)] + args
328327

@@ -538,7 +537,7 @@ def check_script_list(src_dir):
538537
539538
Check that there are no scripts in the functional tests directory which are
540539
not being run by pull-tester.py."""
541-
script_dir = src_dir + '/test/functional/'
540+
script_dir = src_dir + '/test/bitcoin_functional/functional/'
542541
python_files = set([test_file for test_file in os.listdir(script_dir) if test_file.endswith(".py")])
543542
missed_tests = list(python_files - set(map(lambda x: x.split()[0], ALL_SCRIPTS + NON_SCRIPTS)))
544543
if len(missed_tests) != 0:

0 commit comments

Comments
 (0)