return (0 if result.wasSuccessful() else 1)
-def RunTestCoverage(toolpath):
+def RunTestCoverage(toolpath, build_dir):
"""Run the tests and check that we get 100% coverage"""
glob_list = control.GetEntryModules(False)
all_set = set([os.path.splitext(os.path.basename(item))[0]
test_util.run_test_coverage('tools/binman/binman', None,
['*test*', '*main.py', 'tools/patman/*', 'tools/dtoc/*',
'tools/u_boot_pylib/*'],
- args.build_dir, all_set, extra_args or None)
+ build_dir, all_set, extra_args or None)
def RunBinman(args):
"""Main entry point to binman once arguments are parsed
if args.cmd == 'test':
if args.test_coverage:
- RunTestCoverage(args.toolpath)
+ RunTestCoverage(args.toolpath, args.build_dir)
else:
ret_code = RunTests(args.debug, args.verbosity, args.processes,
args.test_preserve_dirs, args.tests,
return ret_code
-if __name__ == "__main__":
+def start_binman():
args = cmdline.ParseArgs(sys.argv[1:])
ret_code = RunBinman(args)
sys.exit(ret_code)
+
+
+if __name__ == "__main__":
+ start_binman()