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

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: 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
(Empty)
1 from slave 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 buildername='TestBuilder',
17 buildnumber=571,
18 mastername='chromium.testing.master',
19 slavename='TestSlavename',
20 workdir='/path/to/workdir/TestSlavename',
21 )
22 ret.properties.update(kwargs)
23 return ret
24
25 def scheduled(self, **kwargs):
26 """
27 Merge kwargs into a typical buildbot properties blob for a job fired off
28 by a chrome/trunk svn scheduler, and return the blob.
29 """
30 ret = self.generic(
31 branch='TestBranch',
32 project='',
33 repository='svn://svn-mirror.golo.chromium.org/chrome/trunk',
34 revision='204787',
35 )
36 ret.properties.update(kwargs)
37 return ret
38
39 def tryserver(self, **kwargs):
40 """
41 Merge kwargs into a typical buildbot properties blob for a job fired off
42 by a rietveld tryjob on the tryserver, and return the blob.
43 """
44 ret = self.generic(
45 branch='',
46 issue=12853011,
47 patchset=1,
48 project='chrome',
49 repository='',
50 requester='commit-bot@chromium.org',
51 revision='HEAD',
52 rietveld='https://codereview.chromium.org',
53 root='src',
54 )
55 ret.properties.update(kwargs)
56 return ret
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/platform/test_api.py ('k') | scripts/slave/recipe_modules/python/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698