diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-09 18:39:29 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-24 19:25:15 -0600 |
commit | 32eb66d2d4f3f761d98946414bcf7ca08600d422 (patch) | |
tree | d5628729152e4de4c189cd62d4839bf1c6e30209 /tools/binman/main.py | |
parent | fdb3040e964608c4d6caac9e8b18cb4b0a2a45b5 (diff) |
binman: Specify the toolpath when running test coverage
At present binman's test coverage runs without a toolpath set. This means
that the system tools will be used. That may not be correct if they are
out of date or missing and this can result in a reduction in test coverage
below 100%.
Provide the toolpath to binman in this case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/main.py')
-rwxr-xr-x | tools/binman/main.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/binman/main.py b/tools/binman/main.py index 6f5a9d1ca2..a5793d5d23 100755 --- a/tools/binman/main.py +++ b/tools/binman/main.py @@ -89,14 +89,18 @@ def GetEntryModules(include_testing=True): for item in glob_list if include_testing or '_testing' not in item]) -def RunTestCoverage(): +def RunTestCoverage(toolpath): """Run the tests and check that we get 100% coverage""" glob_list = GetEntryModules(False) all_set = set([os.path.splitext(os.path.basename(item))[0] for item in glob_list if '_testing' not in item]) + extra_args = '' + if toolpath: + for path in toolpath: + extra_args += ' --toolpath %s' % path test_util.RunTestCoverage('tools/binman/binman', None, ['*test*', '*main.py', 'tools/patman/*', 'tools/dtoc/*'], - args.build_dir, all_set) + args.build_dir, all_set, extra_args or None) def RunBinman(args): """Main entry point to binman once arguments are parsed @@ -111,7 +115,7 @@ def RunBinman(args): if args.cmd == 'test': if args.test_coverage: - RunTestCoverage() + RunTestCoverage(args.toolpath) else: ret_code = RunTests(args.debug, args.verbosity, args.processes, args.test_preserve_dirs, args.tests, |