Skip to contentSkip to conversation

lib/buildsteps.py: fix report creation in nigthly-oecore

PATCH In review Aníbal Limón 2 participants 2 messages Jul 29, 2016 – Aug 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lib/buildsteps.py: fix report creation in nigthly-oecore

nightly-oecore buildset doesn't prove got_revision property so when got_revision is None use got_revision_oecore instead.

[YOCTO #10051]

---
 lib/python2.7/site-packages/autobuilder/lib/buildsteps.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
lib/python2.7/site-packages/autobuilder/lib/buildsteps.py +9 -2
index eee0c1b..f7b1921 100644
@@ -118,8 +118,15 @@ class BitbakeShellCommand(ShellCommand):
         report['target_sys'] = vrs['TARGET_SYS']
 
         report['component'] = 'bitbake'
-        report['branch_commit'] = self.getProperty('branch') + ': ' + \
-                self.getProperty('got_revision')
+        try:
+            branch = self.getProperty('branch')
+            revision = self.getProperty('got_revision')
+            if not revision:
+                revision = self.getProperty('got_revision_oecore')
+        except:
+            branch = "unknown_branch"
+            revision = "unknown_revision"
+        report['branch_commit'] = branch + ': ' + revision
 
         failure = {}
         failure['package'] = "bitbake-%s" % vrs['BB_VERSION']
Signature · 1 line
2.1.4
#1 lore raw
Quoted 3 lines · Aníbal Limón

nightly-oecore buildset doesn't prove got_revision property so when got_revision is None use got_revision_oecore instead.

pulled into master, thanks!

-b

Quoted 33 lines

[YOCTO #10051]

---
 lib/python2.7/site-packages/autobuilder/lib/buildsteps.py | 11
+++++++++--

 1 file changed, 9 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

packages/autobuilder/lib/buildsteps.py b/lib/python2.7/site- packages/autobuilder/lib/buildsteps.py
index eee0c1b..f7b1921 100644

lib/python2.7/site-packages/autobuilder/lib/buildsteps.py +0 -0
@@ -118,8 +118,15 @@ class BitbakeShellCommand(ShellCommand):

         report['target_sys'] = vrs['TARGET_SYS']

         report['component'] = 'bitbake'
-        report['branch_commit'] = self.getProperty('branch') + ': '
+ \
-                self.getProperty('got_revision')
+        try:
+            branch = self.getProperty('branch')
+            revision = self.getProperty('got_revision') +            if not revision:
+                revision = self.getProperty('got_revision_oecore') +        except:
+            branch = "unknown_branch"
+            revision = "unknown_revision"
+        report['branch_commit'] = branch + ': ' + revision
         failure = {}
         failure['package'] = "bitbake-%s" % vrs['BB_VERSION']