@@ -42,6 +42,7 @@ class SimpleLogObserver(ShellCommand):
self.addLogObserver('stdio', logobserver.LineConsumerLogObserver(partial(self.logConsumer, 'stdio')))
self.yocto_io_re = re.compile(".*/([^/]*yocto.io/pub/(non-release|repro-fail[^/]*/)([^ ']|$)+).*")
self.ptest_fails_re = re.compile(r"WARNING: (\S*)-[0-9.]*-r[0-9]* do_testimage:")
+ self.builder_re = re.compile(r"Target task (\S*) has \S* steps")
def describe(self, done=False):
return self.description
@@ -58,8 +59,10 @@ class SimpleLogObserver(ShellCommand):
if line.startswith("ERROR:"):
self.errorCount += 1
self.errorLines.append(logname + ": " + line)
- if line.startswith("Builder:"):
- self.builder = line.split(':')[1].strip()
+ if not self.builder:
+ match = self.builder_re.match(line)
+ if match:
+ self.builder = match.group(1)
url, matched = self.yocto_io_re.subn('https://\\1', line.strip())
if matched:
self.links.append(url)
Builder name is needed in order to generate correct ptest result links. Previous code tries to extract it from the first log lines, but these lines do not go through the log observer: match somewhere else in the log instead. Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> --- steps/observer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)