Browse files

Bug 567376 - sets who and revision as build properties in UnittestPac…

…kagedBuildFactory p=lsblakk r=jhford
  • Loading branch information...
1 parent 74997af commit 8e81f438f4092e7d9455f8f2abaa7e755ff0af47 @lsblakk lsblakk committed May 21, 2010
Showing with 30 additions and 2 deletions.
  1. +25 −0 process/factory.py
  2. +5 −2 status/generators.py
View
25 process/factory.py
@@ -6137,6 +6137,31 @@ def addInitialSteps(self):
workdir='.',
flunkOnFailure=False,
)
+
+ def get_revision(build):
+ try:
+ revision = build.source.changes[-1].revision
+ return revision
+ except:
+ return "not-set"
+
+ self.addStep(SetBuildProperty(
+ property_name="revision",
+ value=get_revision,
+ ))
+
+ def get_who(build):
+ try:
+ revision = build.source.changes[-1].who
+ return revision
+ except:
+ return "not-set"
+
+ self.addStep(SetBuildProperty(
+ property_name="who",
+ value=get_who,
+ ))
+
MozillaBuildFactory.addInitialSteps(self)
class TalosFactory(BuildFactory):
View
7 status/generators.py
@@ -11,11 +11,14 @@ def buildTryCompleteMessage(attrs, packageDir, tinderboxTree):
try:
got_revision = attrs['buildProperties']['got_revision']
except KeyError:
- got_revision = 'unknown'
+ try:
+ got_revision = attrs['buildProperties']['revision']
+ except KeyError:
+ got_revision = 'revision-not-set'
try:
who = attrs['buildProperties']['who']
except KeyError:
- who = 'unknown'
+ who = 'who-not-set'
if 'Linux' in builder:
platform = 'linux'

0 comments on commit 8e81f43

Please sign in to comment.