@@ -160,7 +160,8 @@ class RunConfigCheckSteps(shell.ShellCommand):
haltOnFailure = False
flunkOnFailure = True
jsonFileName = util.Interpolate("%(prop:builddir)s/runconfig.json")
- logfiles = {'json': jsonFileName}
+ propertiesFileName = util.Interpolate("%(prop:builddir)s/runconfig-properties.json")
+ logfiles = {'json': jsonFileName, 'properties': propertiesFileName}
def __init__(self, *args, **kwargs):
self.posttrigger = kwargs.pop("posttrigger")
@@ -171,6 +172,8 @@ class RunConfigCheckSteps(shell.ShellCommand):
self.log_observer_json = logobserver.BufferLogObserver()
self.addLogObserver('json', self.log_observer_json)
+ self.log_observer_properties = logobserver.BufferLogObserver()
+ self.addLogObserver('properties', self.log_observer_properties)
@defer.inlineCallbacks
def run(self):
@@ -188,12 +191,21 @@ class RunConfigCheckSteps(shell.ShellCommand):
# If the command fails, fall back to old style run-config execution
rc = cmd.results()
logLines = self.log_observer_json.getStdout()
+ propertiesLines = self.log_observer_properties.getStdout()
jsonconfig = None
try:
jsonconfig = json.loads(logLines)
except Exception as ex:
self._addToLog('stderr', 'ERROR: unable to parse data, exception {}: {}'.format(ex.__class__, ex))
+ try:
+ properties = json.loads(propertiesLines)
+ except Exception as ex:
+ self._addToLog('stderr', 'INFO: unable to parse properties data, exception {}: {}'.format(ex.__class__, ex))
+ else:
+ for k, v in properties.items():
+ self.setProperty(k, v, "run-config output")
+
if rc == FAILURE or not jsonconfig:
steps = [get_runconfig_legacy_step(self.posttrigger)]
else:
Add some important build configuration such as MACHINE or DISTRO to buildbot build properties. Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> --- steps/runconfig.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)