Sha256: ea9f211ac83696b8fe9f044dadd5a4ca4dafbf86df9b267bc17a150de9fbfd24

Contents?: true

Size: 1.69 KB

Versions: 8

Compression:

Stored size: 1.69 KB

Contents

# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

DEPS = [
    'gitiles',
    'recipe_engine/properties',
]


def RunSteps(api):
  url = 'https://chromium.googlesource.com/chromium/src'
  for ref in api.gitiles.refs(url):
    _, cursor = api.gitiles.log(url, ref)
    if cursor:
      api.gitiles.log(url, ref, limit=10, cursor=cursor)
  api.gitiles.commit_log(url, api.properties['commit_log_hash'])

  data = api.gitiles.download_file(url, 'OWNERS', attempts=5)
  assert data == 'foobar'


def GenTests(api):
  yield (
      api.test('basic')
      + api.properties(
          commit_log_hash=api.gitiles.make_hash('commit'),
      )
      + api.step_data('refs', api.gitiles.make_refs_test_data(
          'HEAD',
          'refs/heads/A',
          'refs/tags/B',
      ))
      + api.step_data(
          'gitiles log: HEAD',
          api.gitiles.make_log_test_data('HEAD', cursor='deadbeaf'),
      )
      + api.step_data(
          'gitiles log: HEAD from deadbeaf',
          api.gitiles.make_log_test_data('HEAD'),
      )
      + api.step_data(
          'gitiles log: refs/heads/A',
          api.gitiles.make_log_test_data('A'),
      )
      + api.step_data(
          'gitiles log: refs/tags/B',
          api.gitiles.make_log_test_data('B')
      )
      + api.step_data(
          'commit log: %s' % (api.gitiles.make_hash('commit')),
          api.gitiles.make_commit_test_data('commit', 'C', new_files=[
              'foo/bar',
              'baz/qux',
          ])
      )
      + api.step_data(
          'fetch master:OWNERS',
          api.gitiles.make_encoded_file('foobar')
      )
  )

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
libv8-6.0.286.54.1 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-6.0.286.54.0 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-6.0.286.54.0beta2 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-6.0.286.54.0beta1 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-6.0.286.44.0beta1 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-5.9.211.38.1 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-5.9.211.38.0 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py
libv8-5.9.211.38.0beta0 vendor/depot_tools/recipes/recipe_modules/gitiles/examples/full.py