summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorJeremy Laine <jeremy.laine@m4x.org>2008-05-19 20:15:34 +0000
committerJeremy Laine <jeremy.laine@m4x.org>2008-05-19 20:15:34 +0000
commitd8f506cb09a7cecc7102c1cad4e894b0ce5ca488 (patch)
treed85250feabffbaf489918601a637019cade3c8e7 /classes
parent3ed3548bea762814bb8a9336b9c349c2df67c6a1 (diff)
oestats-clients.bbclass: discriminate between Succeeded and Failed builds
Diffstat (limited to 'classes')
-rw-r--r--classes/oestats-client.bbclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/classes/oestats-client.bbclass b/classes/oestats-client.bbclass
index ff07d6edca..63380328bc 100644
--- a/classes/oestats-client.bbclass
+++ b/classes/oestats-client.bbclass
@@ -81,7 +81,7 @@ def oestats_start(server, builder, d):
bb.note("oestats: error starting build, disabling stats")
oestats_setid(d, id)
-def oestats_stop(server, d, status):
+def oestats_stop(server, d, failures):
import bb
# retrieve build id
@@ -89,6 +89,11 @@ def oestats_stop(server, d, status):
if not id: return
# send report
+ if failures > 0:
+ status = "Failed"
+ else:
+ status = "Succeeded"
+
try:
response = oestats_send(server, "/builds/%s/" % id, {
'status': status,
@@ -155,7 +160,7 @@ python oestats_eventhandler () {
if getName(e) == 'BuildStarted':
oestats_start(server, builder, e.data)
elif getName(e) == 'BuildCompleted':
- oestats_stop(server, e.data, 'Completed')
+ oestats_stop(server, e.data, e.getFailures())
elif getName(e) == 'TaskStarted':
bb.data.setVar('OESTATS_STAMP', repr(time.time()), e.data)
elif getName(e) == 'TaskSucceeded':