Пример #1
0
def main(argv):
    cros_build_lib.AssertInsideChroot()
    opts = _ParseArguments(argv)

    site_config = config_lib.GetConfig()

    logging.info('Generating board configs. This takes about 2m...')
    for key in sorted(binhost.GetChromePrebuiltConfigs(site_config)):
        binhost.GenConfigsForBoard(key.board,
                                   regen=opts.regen,
                                   error_code_ok=True)

    # Fetch all compat IDs.
    fetcher = binhost.CompatIdFetcher()
    keys = binhost.GetChromePrebuiltConfigs(site_config).keys()
    compat_ids = fetcher.FetchCompatIds(keys)

    # Save the PFQ configs.
    pfq_configs = binhost.PrebuiltMapping.Get(keys, compat_ids)
    filename_internal = binhost.PrebuiltMapping.GetFilename(
        opts.buildroot, 'chrome')
    pfq_configs.Dump(filename_internal)
    git.AddPath(filename_internal)
    git.Commit(os.path.dirname(filename_internal),
               'Update PFQ config dump',
               allow_empty=True)

    filename_external = binhost.PrebuiltMapping.GetFilename(opts.buildroot,
                                                            'chromium',
                                                            internal=False)
    pfq_configs.Dump(filename_external, internal=False)
    git.AddPath(filename_external)
    git.Commit(os.path.dirname(filename_external),
               'Update PFQ config dump',
               allow_empty=True)
Пример #2
0
 def setUpClass(cls):
     assert cros_build_lib.IsInsideChroot()
     logging.info('Generating board configs.')
     board_keys = binhost.GetAllImportantBoardKeys(cls.site_config)
     boards = set(key.board for key in board_keys)
     inputs = [[board, not cls.CACHING, False] for board in boards]
     parallel.RunTasksInProcessPool(binhost.GenConfigsForBoard, inputs)
     fetcher = binhost.CompatIdFetcher(caching=cls.CACHING)
     cls.COMPAT_IDS = fetcher.FetchCompatIds(list(board_keys))
Пример #3
0
 def setUpClass(cls):
     assert cros_build_lib.IsInsideChroot()
     logging.info('Generating board configs. This takes about 30m...')
     board_keys = binhost.GetAllImportantBoardKeys(cls.site_config)
     boards = set(key.board for key in board_keys)
     for board in sorted(boards):
         binhost.GenConfigsForBoard(board,
                                    regen=not cls.CACHING,
                                    error_code_ok=False)
     fetcher = binhost.CompatIdFetcher(caching=cls.CACHING)
     cls.COMPAT_IDS = fetcher.FetchCompatIds(list(board_keys))