@@ -160,17 +160,22 @@ 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")
self.command = get_runconfig_command(self.posttrigger)
self.command.append("--json-outputfile")
self.command.append(self.jsonFileName)
+ self.command.append("--properties-outputfile")
+ self.command.append(self.propertiesFileName)
super().__init__(*args, **kwargs)
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 +193,17 @@ 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)
+ properties = json.loads(propertiesLines)
except Exception as ex:
self._addToLog('stderr', 'ERROR: unable to parse data, exception {}: {}'.format(ex.__class__, ex))
+ 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)