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

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

Powered by Google App Engine
This is Rietveld 408576698