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

Side by Side Diff: scripts/slave/recipe_modules/properties/test_api.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Roll to latest recipes-py Created 5 years, 3 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
(Empty)
1 from recipe_engine import recipe_test_api
2
3 class PropertiesTestApi(recipe_test_api.RecipeTestApi):
4 def __call__(self, **kwargs):
5 ret = self.test(None)
6 ret.properties.update(kwargs)
7 return ret
8
9 def generic(self, **kwargs):
10 """
11 Merge kwargs into a typical buildbot properties blob, and return the blob.
12 """
13 ret = self(
14 blamelist='cool_dev1337@chromium.org,hax@chromium.org',
15 blamelist_real=['cool_dev1337@chromium.org', 'hax@chromium.org'],
16 buildbotURL='http://c.org/p/cr/',
17 buildername='TestBuilder',
18 buildnumber=571,
19 mastername='chromium.testing.master',
20 slavename='TestSlavename',
21 workdir='/path/to/workdir/TestSlavename',
22 )
23 ret.properties.update(kwargs)
24 return ret
25
26 def scheduled(self, **kwargs):
27 """
28 Merge kwargs into a typical buildbot properties blob for a job fired off
29 by a chrome/trunk svn scheduler, and return the blob.
30 """
31 ret = self.generic(
32 branch='TestBranch',
33 project='',
34 repository='svn://svn-mirror.golo.chromium.org/chrome/trunk',
35 revision='204787',
36 )
37 ret.properties.update(kwargs)
38 return ret
39
40 def git_scheduled(self, **kwargs):
41 """
42 Merge kwargs into a typical buildbot properties blob for a job fired off
43 by a gitpoller/scheduler, and return the blob.
44 """
45 ret = self.generic(
46 branch='master',
47 project='',
48 repository='https://chromium.googlesource.com/chromium/src.git',
49 revision='c14d891d44f0afff64e56ed7c9702df1d807b1ee',
50 )
51 ret.properties.update(kwargs)
52 return ret
53
54 def tryserver(self, **kwargs):
55 """
56 Merge kwargs into a typical buildbot properties blob for a job fired off
57 by a rietveld tryjob on the tryserver, and return the blob.
58 """
59 ret = self.generic(
60 branch='',
61 issue=12853011,
62 patchset=1,
63 project='chrome',
64 repository='',
65 requester='commit-bot@chromium.org',
66 revision='HEAD',
67 rietveld='https://codereview.chromium.org',
68 patch_project='chromium',
69 )
70 ret.properties.update(kwargs)
71 return ret
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/properties/example.expected/lists.json ('k') | scripts/slave/recipe_modules/python/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698