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