def main(): _main = Main() _main.parse_args() try: generate_tags(_main.args[0]) except IndexError: _main.error("where is makefile.setup ?")
def __cmdline_options(self): """Return an options object to represent the command line options""" main = Main(require_docstring=False, add_targets_options=True) main.add_option('--timeout', dest='timeout', type=int, default=None) main.add_option('--trace_dir', dest='trace_dir', metavar='DIR', help='Traces location. No bootstrap if not specified.', default=None) main.add_option('--report-file', dest='report_file', metavar='FILE', help='The filename where to store the test report ' '[required]') main.add_option('--qualif-level', dest='qualif_level', metavar='QUALIF_LEVEL', help='The target qualification level when we are ' 'running in qualification mode.') main.add_option('--xcov-level', dest='xcov_level', help='Force the --level argument passed to xcov ' 'instead of deducing it from the test category ' 'when that normally happens.') main.add_option('--tags', dest='tags', default="") control.add_shared_options_to(main, toplevel=False) main.parse_args() if main.options.report_file is None: # This is a required "option" which is a bit self-contradictory, # but it's easy to do it that way. main.error("The report file must be specified with --report-file") # Get our tags set as a list. Fetch contents from file if needed # first: if main.options.tags and main.options.tags.startswith('@'): main.options.tags = ' '.join(lines_of(main.options.tags[1:])) if main.options.tags: main.options.tags = main.options.tags.split() return main.options