|
128 | 128 |
|
129 | 129 | ALL_SCRIPTS = BASE_SCRIPTS + ZMQ_SCRIPTS + EXTENDED_SCRIPTS
|
130 | 130 |
|
| 131 | +NON_SCRIPTS = [ |
| 132 | + # These are python files that live in the functional tests directory, but are not test scripts. |
| 133 | + "combine_logs.py", |
| 134 | + "create_cache.py", |
| 135 | + "test_runner.py", |
| 136 | +] |
| 137 | + |
131 | 138 | def main():
|
132 | 139 | # Parse arguments and pass through unrecognised args
|
133 | 140 | parser = argparse.ArgumentParser(add_help=False,
|
@@ -218,6 +225,8 @@ def main():
|
218 | 225 | subprocess.check_call([(config["environment"]["SRCDIR"] + '/test/functional/' + test_list[0].split()[0])] + ['-h'])
|
219 | 226 | sys.exit(0)
|
220 | 227 |
|
| 228 | + check_script_list(config["environment"]["SRCDIR"]) |
| 229 | + |
221 | 230 | run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], args.jobs, args.coverage, passon_args)
|
222 | 231 |
|
223 | 232 | def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=False, args=[]):
|
@@ -341,6 +350,18 @@ def get_next(self):
|
341 | 350 | return name, stdout, stderr, status, int(time.time() - time0)
|
342 | 351 | print('.', end='', flush=True)
|
343 | 352 |
|
| 353 | +def check_script_list(src_dir): |
| 354 | + """Check scripts directory. |
| 355 | +
|
| 356 | + Check that there are no scripts in the functional tests directory which are |
| 357 | + not being run by pull-tester.py.""" |
| 358 | + script_dir = src_dir + '/test/functional/' |
| 359 | + python_files = set([t for t in os.listdir(script_dir) if t[-3:] == ".py"]) |
| 360 | + missed_tests = list(python_files - set(map(lambda x: x.split()[0], ALL_SCRIPTS + NON_SCRIPTS))) |
| 361 | + if len(missed_tests) != 0: |
| 362 | + print("The following scripts are not being run:" + str(missed_tests)) |
| 363 | + print("Check the test lists in test_runner.py") |
| 364 | + sys.exit(1) |
344 | 365 |
|
345 | 366 | class RPCCoverage(object):
|
346 | 367 | """
|
|
0 commit comments