From e33b2391b106b1f76f4a7176a8fb3a76d4410221 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Tue, 21 Feb 2006 21:41:58 +0000 Subject: classes/tinderclient.bbclass: Redo the changes... they were magically lost. readlines is a sequence, we join them (we might need to remove the \n) --- classes/tinderclient.bbclass | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'classes/tinderclient.bbclass') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index d01bce1fcf..c2e09b86bc 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -161,6 +161,7 @@ def tinder_print_info(d): bbfiles = data.getVar( 'BBFILES', d, True ) tarch = data.getVar( 'TARGET_ARCH', d, True ) fpu = data.getVar( 'TARGET_FPU', d, True ) + oerev = data.getVar( 'OE_REVISION', d, True ) or "unknown" # there is a bug with tipple quoted strings # i will work around but will fix the original @@ -184,6 +185,7 @@ def tinder_print_info(d): output.append("MACHINE = '%(machine)s'" ) output.append("DISTRO = '%(distro)s'" ) output.append("BBFILES = '%(bbfiles)s'" ) + output.append("OEREV = '%(oerev)s'" ) output.append("== End Tinderbox Client Info" ) # now create the real output @@ -227,6 +229,7 @@ def tinder_tinder_start(d): output.append( config ) output.append( env ) output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) + output.append( "" ) return "\n".join(output) % vars() def tinder_do_tinder_report(event): @@ -270,21 +273,21 @@ def tinder_do_tinder_report(event): if len(log_file) != 0: to_file = data.getVar('TINDER_LOG', event.data, True) - log = open(log_file[0], 'r').readlines() + log += "\n".join(open(log_file[0], 'r').readlines()) # set the right 'HEADER'/Summary for the TinderBox if name == "TaskStarted": - log += "--> TINDERBOX Task %s started" % event.task + log += "---> TINDERBOX Task %s started\n" % event.task elif name == "TaskSucceeded": - log += "<-- TINDERBOX Task %s done (SUCCESS)" % event.task + log += "<--- TINDERBOX Task %s done (SUCCESS)\n" % event.task elif name == "TaskFailed": - log += "<-- TINDERBOX Task %s failed (FAILURE)" % event.task + log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task elif name == "PkgStarted": - log += "--> TINDERBOX Package %s started" % data.getVar('P', event.data, True) + log += "---> TINDERBOX Package %s started\n" % data.getVar('P', event.data, True) elif name == "PkgSucceeded": - log += "<-- TINDERBOX Package %s done (SUCCESS)" % data.getVar('P', event.data, True) + log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % data.getVar('P', event.data, True) elif name == "PkgFailed": - log += "<-- TINDERBOX Package %s failed (FAILURE)" % data.getVar('P', event.data, True) + log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) status = 200 elif name == "BuildCompleted": status = 100 -- cgit v1.2.3 From 98d6c76e508c0e41b76e9f6966e127ed5e444fde Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 22 Feb 2006 00:14:54 +0000 Subject: classes/tinderclient.bbclass: Be less verbose do not print the results for now. A proper fix/configurable one is pending. --- classes/tinderclient.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes/tinderclient.bbclass') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index c2e09b86bc..0dc186af27 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -84,7 +84,7 @@ def tinder_build_start(d): selector = url + "/xml/build_start.pl" - print "selector %s and url %s" % (selector, url) + #print "selector %s and url %s" % (selector, url) # now post it h = httplib.HTTP(server) @@ -94,7 +94,7 @@ def tinder_build_start(d): h.endheaders() h.send(body) errcode, errmsg, headers = h.getreply() - print errcode, errmsg, headers + #print errcode, errmsg, headers report = h.file.read() # now let us find the machine id that was assigned to us @@ -134,8 +134,8 @@ def tinder_send_http(d, status, log): h.endheaders() h.send(body) errcode, errmsg, headers = h.getreply() - print errcode, errmsg, headers - print h.file.read() + #print errcode, errmsg, headers + #print h.file.read() def tinder_print_info(d): -- cgit v1.2.3 From 4931db455e5e0d58d341d85e5784592257679959 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 22 Feb 2006 01:07:13 +0000 Subject: classes/tinderclient.bbclass: -Have a none empty log messages when the build is completed otherwise the log is not transfered to the server. Now the build turns green :) --- classes/tinderclient.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes/tinderclient.bbclass') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index 0dc186af27..67cd95842f 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -290,6 +290,7 @@ 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" status = 100 # now post the log -- cgit v1.2.3 From 2632bfb15de5fd251d7e025b2a7d03171ac756b3 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 22 Feb 2006 23:07:23 +0000 Subject: classes/tinderclient.bbclass: -Disable sending of the environment as this somehow refuses to work from within a screen - dunno why -The lines of the log messages are ended with a new line no need to add another empty line. --- classes/tinderclient.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes/tinderclient.bbclass') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index 67cd95842f..1c6a6c497f 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -221,13 +221,13 @@ def tinder_tinder_start(d): time_start = tinder_time_string() config = tinder_print_info(d) - env = tinder_print_env() + #env = tinder_print_env() time_end = tinder_time_string() output = [] output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) output.append( config ) - output.append( env ) + #output.append( env ) output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) output.append( "" ) return "\n".join(output) % vars() @@ -273,7 +273,7 @@ def tinder_do_tinder_report(event): if len(log_file) != 0: to_file = data.getVar('TINDER_LOG', event.data, True) - log += "\n".join(open(log_file[0], 'r').readlines()) + log += "".join(open(log_file[0], 'r').readlines()) # set the right 'HEADER'/Summary for the TinderBox if name == "TaskStarted": -- cgit v1.2.3