OLD | NEW |
| (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 | |
OLD | NEW |