OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import re | 5 import re |
6 | 6 |
7 import buildbot | 7 import buildbot |
8 from buildbot.process.properties import Properties | 8 from buildbot.process.properties import Properties |
9 | 9 |
10 from twisted.python import log | 10 from twisted.python import log |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 Initialize with the Scheduler's base properties. | 85 Initialize with the Scheduler's base properties. |
86 """ | 86 """ |
87 keys = ('clobber', 'issue', 'patchset', 'rietveld', 'testfilter') | 87 keys = ('clobber', 'issue', 'patchset', 'rietveld', 'testfilter') |
88 # All these settings have no meaning when False or not set, so don't set | 88 # All these settings have no meaning when False or not set, so don't set |
89 # them in that case. | 89 # them in that case. |
90 properties = dict((i, options[i]) for i in keys if options.get(i)) | 90 properties = dict((i, options[i]) for i in keys if options.get(i)) |
91 props = Properties() | 91 props = Properties() |
92 props.updateFromProperties(self.properties) | 92 props.updateFromProperties(self.properties) |
93 props.update(properties, 'Try job') | 93 props.update(properties, 'Try job') |
94 return props | 94 return props |
| 95 |
| 96 # R0201: 96,0:TryJobBase.parse_decoration: Method could be a function |
| 97 # No, this would disturb the finding of it from the MixIn classes. |
| 98 # pylint: disable=R0201 |
| 99 def parse_decoration(self, properties, decorations): |
| 100 """Returns properties extended by the meaning of decoration. |
| 101 """ |
| 102 |
| 103 props = Properties() |
| 104 props.updateFromProperties(properties) |
| 105 for decoration in decorations.split(':'): |
| 106 if decoration == 'compile': |
| 107 testfilter = props.getProperty('testfilter') or 'None' |
| 108 props.setProperty('testfilter', testfilter, 'Decoration') |
| 109 |
| 110 #TODO(petermayo) Define a DSL of useful modifications to individual |
| 111 # bots of a test run. |
| 112 return props |
OLD | NEW |