Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: scripts/slave/recipe_modules/git/example.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: License headers Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'git', 6 'git',
7 'path', 7 'path',
8 'platform',
8 ] 9 ]
9 10
10 11
11 def GenSteps(api): 12 def GenSteps(api):
12 url = 'https://chromium.googlesource.com/chromium/src.git' 13 url = 'https://chromium.googlesource.com/chromium/src.git'
13 14
14 # You can use api.git.checkout to perform all the steps of a safe checkout. 15 # You can use api.git.checkout to perform all the steps of a safe checkout.
15 yield api.git.checkout(url, recursive=True) 16 yield api.git.checkout(url, recursive=True)
16 17
17 # If you need to run more arbitrary git commands, you can use api.git itself, 18 # If you need to run more arbitrary git commands, you can use api.git itself,
18 # which behaves like api.step(), but automatically sets the name of the step. 19 # which behaves like api.step(), but automatically sets the name of the step.
19 yield api.git('status', cwd=api.path.checkout()) 20 yield api.git('status', cwd=api.path.checkout())
20 21
21 22
22 def GenTests(_api): 23 def GenTests(api):
23 yield 'basic', {} 24 yield api.test('basic')
24 25
25 yield 'platform_win', { 26 yield api.test('platform_win') + api.platform.name('win')
26 'mock': {
27 'platform': {
28 'name': 'win'
29 }
30 }
31 }
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/generator_script/test_api.py ('k') | scripts/slave/recipe_modules/json/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698