Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | if not (enable_wallet and enable_utils and enable_bitcoind): | ||||
"No functional tests to run. Wallet, utils, and bitcoind must all be enabled") | "No functional tests to run. Wallet, utils, and bitcoind must all be enabled") | ||||
print( | print( | ||||
"Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make") | "Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make") | ||||
sys.exit(0) | sys.exit(0) | ||||
# Build list of tests | # Build list of tests | ||||
all_scripts = get_all_scripts_from_disk(tests_dir, NON_SCRIPTS) | all_scripts = get_all_scripts_from_disk(tests_dir, NON_SCRIPTS) | ||||
# Check all tests with parameters actually exist | |||||
for test in TEST_PARAMS: | |||||
if not test in all_scripts: | |||||
print("ERROR: Test with parameter {} does not exist, check it has " | |||||
"not been renamed or deleted".format(test)) | |||||
sys.exit(1) | |||||
if tests: | if tests: | ||||
# Individual tests have been specified. Run specified tests that exist | # Individual tests have been specified. Run specified tests that exist | ||||
# in the all_scripts list. Accept the name with or without .py | # in the all_scripts list. Accept the name with or without .py | ||||
# extension. | # extension. | ||||
test_list = [t for t in all_scripts if | test_list = [t for t in all_scripts if | ||||
(t in tests or re.sub(".py$", "", t) in tests)] | (t in tests or re.sub(".py$", "", t) in tests)] | ||||
cutoff = sys.maxsize # do not cut off explicitly specified tests | cutoff = sys.maxsize # do not cut off explicitly specified tests | ||||
else: | else: | ||||
▲ Show 20 Lines • Show All 491 Lines • Show Last 20 Lines |