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

Side by Side Diff: scripts/slave/recipe_modules/properties/test_api.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: rebase Created 7 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 slave import recipe_test_api
2
3 class PropertiesTestApi(recipe_test_api.RecipeTestApi):
4 def generic(self, **kwargs):
5 """
6 Merge kwargs into a typical buildbot properties blob, and return the blob.
7 """
8 ret = self.Properties(
9 blamelist='cool_dev1337@chromium.org,hax@chromium.org',
10 blamelist_real=['cool_dev1337@chromium.org', 'hax@chromium.org'],
11 buildername='TestBuilder',
12 buildnumber=571,
13 mastername='chromium.testing.master',
14 slavename='TestSlavename',
15 workdir='/path/to/workdir/TestSlavename',
16 )
17 ret.properties.update(kwargs)
18 return ret
19
20 def scheduled(self, **kwargs):
21 """
22 Merge kwargs into a typical buildbot properties blob for a job fired off
23 by a chrome/trunk svn scheduler, and return the blob.
24 """
25 ret = self.generic(
26 branch='TestBranch',
27 project='',
28 repository='svn://svn-mirror.golo.chromium.org/chrome/trunk',
29 revision='204787',
30 )
31 ret.properties.update(kwargs)
32 return ret
33
34 def tryserver(self, **kwargs):
35 """
36 Merge kwargs into a typical buildbot properties blob for a job fired off
37 by a rietveld tryjob on the tryserver, and return the blob.
38 """
39 ret = self.generic(
40 branch='',
41 issue=12853011,
42 patchset=1,
43 project='chrome',
44 repository='',
45 requester='commit-bot@chromium.org',
46 revision='HEAD',
47 rietveld='https://chromiumcodereview.appspot.com',
48 root='src',
49 )
50 ret.properties.update(kwargs)
51 return ret
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698