summaryrefslogtreecommitdiffstats
path: root/openembedded/classes/tinderclient.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/classes/tinderclient.bbclass')
-rw-r--r--openembedded/classes/tinderclient.bbclass31
1 files changed, 21 insertions, 10 deletions
diff --git a/openembedded/classes/tinderclient.bbclass b/openembedded/classes/tinderclient.bbclass
index 1c6a6c497f..f9243f7108 100644
--- a/openembedded/classes/tinderclient.bbclass
+++ b/openembedded/classes/tinderclient.bbclass
@@ -1,9 +1,6 @@
1def tinder_form_data(bound, dict, log): 1def tinder_form_data(bound, dict, log):
2 """
3 Create the boundary for the HTTP Post
4 """
5 output = [] 2 output = []
6 3 #br
7 # for each key in the dictionary 4 # for each key in the dictionary
8 for name in dict: 5 for name in dict:
9 output.append( "--" + bound ) 6 output.append( "--" + bound )
@@ -214,7 +211,7 @@ def tinder_print_env():
214 211
215 return "\n".join(output) % vars() 212 return "\n".join(output) % vars()
216 213
217def tinder_tinder_start(d): 214def tinder_tinder_start(d, event):
218 """ 215 """
219 PRINT the configuration of this build 216 PRINT the configuration of this build
220 """ 217 """
@@ -223,13 +220,18 @@ def tinder_tinder_start(d):
223 config = tinder_print_info(d) 220 config = tinder_print_info(d)
224 #env = tinder_print_env() 221 #env = tinder_print_env()
225 time_end = tinder_time_string() 222 time_end = tinder_time_string()
223 packages = " ".join( event.getPkgs() )
226 224
227 output = [] 225 output = []
228 output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) 226 output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" )
229 output.append( config ) 227 output.append( config )
230 #output.append( env ) 228 #output.append( env )
231 output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) 229 output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" )
232 output.append( "" ) 230 output.append( "---> TINDERBOX BUILDING '%(packages)s'" )
231 output.append( "<--- TINDERBOX STARTING BUILD NOW" )
232
233 output.append( "" )
234
233 return "\n".join(output) % vars() 235 return "\n".join(output) % vars()
234 236
235def tinder_do_tinder_report(event): 237def tinder_do_tinder_report(event):
@@ -252,11 +254,11 @@ def tinder_do_tinder_report(event):
252 name = getName(event) 254 name = getName(event)
253 log = "" 255 log = ""
254 status = 1 256 status = 1
255 257 #print asd
256 # Check what we need to do Build* shows we start or are done 258 # Check what we need to do Build* shows we start or are done
257 if name == "BuildStarted": 259 if name == "BuildStarted":
258 tinder_build_start(event.data) 260 tinder_build_start(event.data)
259 log = tinder_tinder_start(event.data) 261 log = tinder_tinder_start(event.data,event)
260 262
261 try: 263 try:
262 # truncate the tinder log file 264 # truncate the tinder log file
@@ -290,8 +292,18 @@ def tinder_do_tinder_report(event):
290 log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) 292 log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True)
291 status = 200 293 status = 200
292 elif name == "BuildCompleted": 294 elif name == "BuildCompleted":
293 log += "Build Completed\n" 295 log += "Build Completed\n"
294 status = 100 296 status = 100
297 elif name == "MultipleProviders":
298 log += "---> TINDERBOX Multiple Providers\n"
299 log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates())
300 log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem()
301 log += "is runtime: %d\n" % event.isRuntime()
302 log += "<--- TINDERBOX Multiple Providers\n"
303 elif name == "NoProvider":
304 log += "Error: No Provider for: %s\n" % event.getItem()
305 log += "Error:Was Runtime: %d\n" % event.isRuntime()
306 status = 200
295 307
296 # now post the log 308 # now post the log
297 if len(log) == 0: 309 if len(log) == 0:
@@ -307,7 +319,6 @@ addhandler tinderclient_eventhandler
307python tinderclient_eventhandler() { 319python tinderclient_eventhandler() {
308 from bb import note, error, data 320 from bb import note, error, data
309 from bb.event import NotHandled 321 from bb.event import NotHandled
310
311 do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) 322 do_tinder_report = data.getVar('TINDER_REPORT', e.data, True)
312 if do_tinder_report and do_tinder_report == "1": 323 if do_tinder_report and do_tinder_report == "1":
313 tinder_do_tinder_report(e) 324 tinder_do_tinder_report(e)