def testBuilderTryJob(self):
   git_revision = 'ac4a9f31fe2610bd146857bbd55d7a260003a888'
   bot_name = 'linux_perf_bisect_builder'
   bisect_job_name = 'testBisectJobname'
   patch = None
   patch_content = '/dev/null'
   new_branch = bisect_perf_regression.BISECT_TRYJOB_BRANCH
   parent_branch = bisect_perf_regression.BISECT_MASTER_BRANCH
   try_cmd = [
       (['rev-parse', '--abbrev-ref', 'HEAD'], (parent_branch, 0)),
       (['branch', '--list'], ('bisect-tryjob\n*master\nsomebranch', 0)),
       (['branch', '-D', new_branch], ('None', 0)),
       (['update-index', '--refresh', '-q'], (None, 0)),
       (['diff-index', 'HEAD'], (None, 0)),
       (['checkout', '-b', new_branch], ('None', 0)),
       (['branch', '--set-upstream-to', parent_branch],
        ('Setuptream fails', 0)),
       (['try',
         '--bot=%s' % bot_name,
         '--revision=%s' % git_revision,
         '--name=%s' % bisect_job_name,
         '--svn_repo=%s' % bisect_perf_regression.PERF_SVN_REPO_URL,
         '--diff=%s' % patch_content],
        (None, 0)),
   ]
   self._SetupRunGitMock(try_cmd)
   bisect_perf_regression._StartBuilderTryJob(
       fetch_build.PERF_BUILDER, git_revision, bot_name, bisect_job_name,
       patch)
Ejemplo n.º 2
0
 def testBuilderTryJob(self):
   git_revision = 'ac4a9f31fe2610bd146857bbd55d7a260003a888'
   bot_name = 'linux_perf_bisect_builder'
   bisect_job_name = 'testBisectJobname'
   patch = None
   patch_content = '/dev/null'
   new_branch = bisect_perf_regression.BISECT_TRYJOB_BRANCH
   parent_branch = bisect_perf_regression.BISECT_MASTER_BRANCH
   try_cmd = [
       (['rev-parse', '--abbrev-ref', 'HEAD'], (parent_branch, 0)),
       (['branch', '--list'], ('bisect-tryjob\n*master\nsomebranch', 0)),
       (['branch', '-D', new_branch], ('None', 0)),
       (['update-index', '--refresh', '-q'], (None, 0)),
       (['diff-index', 'HEAD'], (None, 0)),
       (['checkout', '-b', new_branch], ('None', 0)),
       (['branch', '--set-upstream-to', parent_branch],
        ('Setuptream fails', 0)),
       (['try',
         '--bot=%s' % bot_name,
         '--revision=%s' % git_revision,
         '--name=%s' % bisect_job_name,
         '--svn_repo=%s' % bisect_perf_regression.PERF_SVN_REPO_URL,
         '--diff=%s' % patch_content],
        (None, 0)),
   ]
   self._SetupRunGitMock(try_cmd)
   bisect_perf_regression._StartBuilderTryJob(
       fetch_build.PERF_BUILDER, git_revision, bot_name, bisect_job_name,
       patch)