Example #1
0
    def testPutAndGet(self):
        isolated.Put(
            (('Mac Builder', 'f9f2b720', 'telemetry_perf', '7c7e90be'),
             ('Mac Builder', 'f35be4f1', 'telemetry_perf', '38e2f262')))

        isolated_hash = isolated.Get('Mac Builder', 'f9f2b720',
                                     'telemetry_perf')
        self.assertEqual(isolated_hash, '7c7e90be')
Example #2
0
  def get(self, builder_name, git_hash, target):
    try:
      isolated_hash = isolated.Get(builder_name, git_hash, target)
    except KeyError as e:
      self.response.set_status(404)
      self.response.write(e)
      return

    self.response.write(isolated_hash)
Example #3
0
def _LookUpIsolated(builder_name, change):
    # The continuous builders build most commits, so find out if the .isolated we
    # want has already been built and cached.

    # The continuous builders build commits as they land. If the commit is a DEPS
    # roll, the builder may break up the roll into its component commits and build
    # each one individually. It does not descend into rolls recurisvely. So we'll
    # only find the Change if it has no patches and at most one dep.

    if len(change.deps) > 1:
        return None

    if change.patch:
        return None

    git_hash = change.most_specific_commit.git_hash
    target = 'telemetry_perf_tests'  # TODO: Support other isolated targets.

    try:
        return isolated.Get(builder_name, git_hash, target)
    except KeyError:
        return None
Example #4
0
 def testUnknownIsolated(self):
     with self.assertRaises(KeyError):
         isolated.Get('Wrong Builder', 'f9f2b720', 'telemetry_perf')