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