Skip to content

Commit 00d1680

Browse files
author
MarcoFalke
committed
Merge bitcoin#12710: Append scripts to new test_list array to fix bad assignment
b0fec8d Append scripts to new test_list array to fix bad assignment (Jeff Rade) Pull request description: Fixes review by @MarcoFalke in PR [bitcoin#12437](bitcoin#12437) Assignment of `test_list` would point to the same array object as `BASE_SCRIPT` or `ALL_SCRIPTS` which we do not want. Tree-SHA512: 57d6c1f4563aaffbac68e96782283799b10be687292152d70ffbbc22e7b52c11c1af0c483acb01c69fbaa99bdae01431b65a5d1d0a913d549f58dfd95d0d28d9
2 parents 585db41 + b0fec8d commit 00d1680

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/test_runner.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,22 @@ def main():
236236
sys.exit(0)
237237

238238
# Build list of tests
239+
test_list = []
239240
if tests:
240241
# Individual tests have been specified. Run specified tests that exist
241242
# in the ALL_SCRIPTS list. Accept the name with or without .py extension.
242243
tests = [re.sub("\.py$", "", test) + ".py" for test in tests]
243-
test_list = []
244244
for test in tests:
245245
if test in ALL_SCRIPTS:
246246
test_list.append(test)
247247
else:
248248
print("{}WARNING!{} Test '{}' not found in full test list.".format(BOLD[1], BOLD[0], test))
249249
elif args.extended:
250250
# Include extended tests
251-
test_list = ALL_SCRIPTS
251+
test_list += ALL_SCRIPTS
252252
else:
253253
# Run base tests only
254-
test_list = BASE_SCRIPTS
254+
test_list += BASE_SCRIPTS
255255

256256
# Remove the test cases that the user has explicitly asked to exclude.
257257
if args.exclude:

0 commit comments

Comments
 (0)