def RunBinman(args): """Main entry point to binman once arguments are parsed Args: args: Command line arguments Namespace object """ ret_code = 0 if not args.debug: sys.tracebacklimit = 0 if args.cmd == 'test': if args.test_coverage: RunTestCoverage() else: ret_code = RunTests(args.debug, args.verbosity, args.processes, args.test_preserve_dirs, args.tests, args.toolpath) elif args.cmd == 'entry-docs': control.WriteEntryDocs(GetEntryModules()) else: try: ret_code = control.Binman(args) except Exception as e: print('binman: %s' % e) if args.debug: print() traceback.print_exc() ret_code = 1 return ret_code
def RunBinman(options, args): """Main entry point to binman once arguments are parsed Args: options: Command-line options args: Non-option arguments """ ret_code = 0 # For testing: This enables full exception traces. #options.debug = True if not options.debug: sys.tracebacklimit = 0 if options.test: ret_code = RunTests(options.debug, args[1:]) elif options.test_coverage: RunTestCoverage() elif options.entry_docs: control.WriteEntryDocs(GetEntryModules()) else: try: ret_code = control.Binman(options, args) except Exception as e: print 'binman: %s' % e if options.debug: print traceback.print_exc() ret_code = 1 return ret_code
def _DoBinman(self, *args): """Run binman using directly (in the same process) Args: Arguments to pass, as a list of strings Returns: Return value (0 for success) """ (options, args) = cmdline.ParseArgs(list(args)) options.pager = 'binman-invalid-pager' options.build_dir = self._indir # For testing, you can force an increase in verbosity here # options.verbosity = tout.DEBUG return control.Binman(options, args)
def RunBinman(options, args): """Main entry point to binman once arguments are parsed Args: options: Command-line options args: Non-option arguments """ ret_code = 0 # For testing: This enables full exception traces. #options.debug = True if not options.debug: sys.tracebacklimit = 0 if options.test: RunTests() elif options.test_coverage: RunTestCoverage() elif options.full_help: pager = os.getenv('PAGER') if not pager: pager = 'more' fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README') command.Run(pager, fname) else: try: ret_code = control.Binman(options, args) except Exception as e: print 'binman: %s' % e if options.debug: print traceback.print_exc() ret_code = 1 return ret_code