Пример #1
0
  def __init__(self, script, params=None, b_params=None, timeout=9000,
               branch='master', chromite_repo=_default_chromite,
               factory=None, use_chromeos_factory=False, slave_manager=True,
               chromite_patch=None, sleep_sync=None,
               show_gclient_output=True, max_time=DEFAULT):
    if chromite_patch:
      assert ('url' in chromite_patch and 'ref' in chromite_patch)

    self.branch = branch
    self.chromite_patch = chromite_patch
    self.chromite_repo = chromite_repo
    self.timeout = timeout
    self.show_gclient_output = show_gclient_output
    self.slave_manager = slave_manager
    self.sleep_sync = sleep_sync
    self.step_args = {}

    if max_time is not DEFAULT:
      self.step_args['maxTime'] = max_time

    if factory:
      self.f_cbuild = factory
    elif use_chromeos_factory:
      # Suppresses revisions, at the moment.
      self.f_cbuild = chromeos_build_factory.BuildFactory()
    else:
      self.f_cbuild = build_factory.BuildFactory()

    self.chromite_dir = None
    self.add_bootstrap_steps()
    if script:
      self.add_chromite_step(script, params, b_params)
Пример #2
0
    def __init__(self,
                 params,
                 buildroot='/b/cbuild',
                 timeout=9000,
                 trigger_name=None,
                 branch='master',
                 crostools_repo=_default_crostools,
                 chromite_repo=_default_chromite,
                 dry_run=False,
                 chrome_root=None,
                 factory=None,
                 pass_revision=False,
                 slave_manager=True,
                 chromite_patch=None,
                 trybot=False,
                 sleep_sync=None):
        self.buildroot = buildroot
        self.crostools_repo = crostools_repo
        self.chromite_repo = chromite_repo
        self.chromite_patch = chromite_patch
        if chromite_patch:
            assert ('url' in chromite_patch and 'ref' in chromite_patch)

        self.timeout = timeout
        self.branch = branch
        self.trigger_name = trigger_name
        self.dry_run = dry_run
        self.chrome_root = chrome_root
        self.slave_manager = slave_manager
        self.trybot = trybot
        self.sleep_sync = sleep_sync

        if factory:
            self.f_cbuild = factory
        elif pass_revision:
            self.f_cbuild = build_factory.BuildFactory()
        else:
            self.f_cbuild = chromeos_build_factory.BuildFactory()

        self.add_bootstrap_steps()
        self.add_cbuildbot_step(params, pass_revision)