From b8acb2c47882b187f34f80919cb776648c734157 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 13 Mar 2006 23:25:05 +0000 Subject: classes/tinderclient.bbclass: Use the MultipleProvider and NoProvider Event to create reports to the TinderBox. The message format can be improved now we at least know if a build failed due a missing provider --- classes/tinderclient.bbclass | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index 1be7bf8c33..e98edb4777 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -1,9 +1,6 @@ def tinder_form_data(bound, dict, log): - """ - Create the boundary for the HTTP Post - """ output = [] - + #br # for each key in the dictionary for name in dict: output.append( "--" + bound ) @@ -257,7 +254,7 @@ def tinder_do_tinder_report(event): name = getName(event) log = "" status = 1 - + #print asd # Check what we need to do Build* shows we start or are done if name == "BuildStarted": tinder_build_start(event.data) @@ -295,8 +292,18 @@ def tinder_do_tinder_report(event): log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) status = 200 elif name == "BuildCompleted": - log += "Build Completed\n" + log += "Build Completed\n" status = 100 + elif name == "MultipleProviders": + log += "<--- TINDERBOX Multiple Providers\n" + log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates()) + log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem() + log += "is runtime: %d" % event.isRuntime() + log += "---> TINDERBOX Multiple Providers\n" + elif name == "NoProvider": + log += "Error: No Provider for: %s\n" % event.getItem() + log += "Error:Was Runtime: %d\n" % event.isRuntime() + status = 200 # now post the log if len(log) == 0: @@ -312,7 +319,6 @@ addhandler tinderclient_eventhandler python tinderclient_eventhandler() { from bb import note, error, data from bb.event import NotHandled - do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) if do_tinder_report and do_tinder_report == "1": tinder_do_tinder_report(e) -- cgit v1.2.3