def main(): all_generators = set(['deps', 'go', 'c']) parser = builder.get_arg_parser('Build the mojom generators.') parser.add_argument('--generators', dest='generators', type=str, default=','.join(all_generators), action='store', help='Comma-separated list of generators to be built by this build ' 'script. These should be directories under mojom/generators. By default ' 'every generator known to the build script will be built.') args = parser.parse_args() generators = args.generators.split(',') for generator in generators: if generator not in all_generators: print "The only allowed generators are: %s" % all_generators.join(',') return -1 final_result = 0 for generator in generators: generator_builder = builder.get_builder( args=args, target_dir='generators', binary_name=generator, src_path=os.path.join('mojom', 'generators', generator)) if args.upload: result = generator_builder.build_and_upload() result = generator_builder.build() if result != 0: final_result = result if not args.keep_going: return result return final_result
def main(): all_generators = set(['deps']) parser = builder.get_arg_parser('Build the mojom generators.') parser.add_argument('--generators', dest='generators', type=str, default=all_generators.join(','), action='store', help='Comma-separated list of generators to be built by this build ' 'script. These should be directories under mojom/generators. By default ' 'every generator known to the build script will be built.') args = parser.parse_args() generators = args.generators.split(',') for generator in generators: if generator not in all_generators: print "The only allowed generators are: %s" % all_generators.join(',') return -1 final_result = 0 for generator in generators: generator_builder = builder.get_builder( args=args, target_dir='generators', binary_name=generator, src_path=os.path.join('mojom', 'generators', generator)) if args.upload: result = generator_builder.build_and_upload() result = generator_builder.build() if result != 0: final_result = result if not args.keep_going: return result return final_result
def main(): parser = builder.get_arg_parser("Build the mojom generators.") args = parser.parse_args() generators = [ 'deps', ] final_result = 0 for generator in generators: generator_builder = builder.get_builder(args=args, target_dir='generators', binary_name=generator, src_path=os.path.join( 'mojom', 'mojom_parser', 'generators', generator)) if args.upload: result = generator_builder.build_and_upload() result = generator_builder.build() if result != 0: final_result = result if not args.keep_going: return result return final_result
def __init__(self, test, refsdir, outdir): self._test = test self._refsdir = refsdir self._outdir = outdir self.config = Config() self._builder = get_builder(self.config.builder) # Add run-tests options to config self.config.keep_results = False self.config.create_diffs = False self.config.update_refs = False
def main(): parser = builder.get_arg_parser("Build the mojom tool.") args = parser.parse_args() parser_builder = builder.get_builder( args=args, target_dir='', binary_name='mojom', src_path=os.path.join('mojom', 'mojom_tool'), friendly_name='mojom tool') if args.upload: return parser_builder.build_and_upload() return parser_builder.build()
def main(): parser = builder.get_arg_parser("Build the mojom tool.") args = parser.parse_args() parser_builder = builder.get_builder(args=args, target_dir='', binary_name='mojom', src_path=os.path.join( 'mojom', 'mojom_tool'), friendly_name='mojom tool') if args.upload: return parser_builder.build_and_upload() return parser_builder.build()
def __init__(self): builder = get_builder('conn_dlg.ui') self.dialog = builder.get_object('conn_dialog') builder.connect_signals(self) # fill port combobox device_store = Gtk.ListStore(str, str) for dev, name, info in sorted(list_ports.comports()): log.debug("COM: %s %s", dev, info) if info == 'n/a': continue device_store.append([dev, info]) port_combo = builder.get_object('port_combo') port_combo.set_model(device_store) text_renderer = Gtk.CellRendererText() port_combo.pack_start(text_renderer, True) port_combo.add_attribute(text_renderer, 'text', 1) port_combo.set_entry_text_column(0) # fill baudrate combobox baud_store = Gtk.ListStore(int, str) for br in sorted(serial.baudrate_constants.keys()): baud_store.append([br, str(br)]) baudrate_combo = builder.get_object('baudrate_combo') baudrate_combo.set_model(baud_store) text_renderer = Gtk.CellRendererText() baudrate_combo.pack_start(text_renderer, True) baudrate_combo.add_attribute(text_renderer, 'text', 1) baudrate_combo.set_active_id(str(57600)) engine_id = builder.get_object('engine_id') engine_id.set_value(1) engine_id.set_increments(1, 10) engine_id.set_range(1, 0xffff) # save ref to widgets self.port_combo = port_combo self.baudrate_combo = baudrate_combo self.engine_id = engine_id self.log_file = builder.get_object('sqlite_file') self.log_name = builder.get_object('log_name')