diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/tinderclient.bbclass | |
parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
download | poky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/tinderclient.bbclass')
-rw-r--r-- | meta/classes/tinderclient.bbclass | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/meta/classes/tinderclient.bbclass b/meta/classes/tinderclient.bbclass index 917b74d887..706a392d7f 100644 --- a/meta/classes/tinderclient.bbclass +++ b/meta/classes/tinderclient.bbclass | |||
@@ -55,22 +55,22 @@ def tinder_format_http_post(d,status,log): | |||
55 | 55 | ||
56 | # the variables we will need to send on this form post | 56 | # the variables we will need to send on this form post |
57 | variables = { | 57 | variables = { |
58 | "tree" : d.getVar('TINDER_TREE', True), | 58 | "tree" : d.getVar('TINDER_TREE'), |
59 | "machine_name" : d.getVar('TINDER_MACHINE', True), | 59 | "machine_name" : d.getVar('TINDER_MACHINE'), |
60 | "os" : os.uname()[0], | 60 | "os" : os.uname()[0], |
61 | "os_version" : os.uname()[2], | 61 | "os_version" : os.uname()[2], |
62 | "compiler" : "gcc", | 62 | "compiler" : "gcc", |
63 | "clobber" : d.getVar('TINDER_CLOBBER', True) or "0", | 63 | "clobber" : d.getVar('TINDER_CLOBBER') or "0", |
64 | "srcdate" : d.getVar('SRCDATE', True), | 64 | "srcdate" : d.getVar('SRCDATE'), |
65 | "PN" : d.getVar('PN', True), | 65 | "PN" : d.getVar('PN'), |
66 | "PV" : d.getVar('PV', True), | 66 | "PV" : d.getVar('PV'), |
67 | "PR" : d.getVar('PR', True), | 67 | "PR" : d.getVar('PR'), |
68 | "FILE" : d.getVar('FILE', True) or "N/A", | 68 | "FILE" : d.getVar('FILE') or "N/A", |
69 | "TARGETARCH" : d.getVar('TARGET_ARCH', True), | 69 | "TARGETARCH" : d.getVar('TARGET_ARCH'), |
70 | "TARGETFPU" : d.getVar('TARGET_FPU', True) or "Unknown", | 70 | "TARGETFPU" : d.getVar('TARGET_FPU') or "Unknown", |
71 | "TARGETOS" : d.getVar('TARGET_OS', True) or "Unknown", | 71 | "TARGETOS" : d.getVar('TARGET_OS') or "Unknown", |
72 | "MACHINE" : d.getVar('MACHINE', True) or "Unknown", | 72 | "MACHINE" : d.getVar('MACHINE') or "Unknown", |
73 | "DISTRO" : d.getVar('DISTRO', True) or "Unknown", | 73 | "DISTRO" : d.getVar('DISTRO') or "Unknown", |
74 | "zecke-rocks" : "sure", | 74 | "zecke-rocks" : "sure", |
75 | } | 75 | } |
76 | 76 | ||
@@ -127,7 +127,7 @@ def tinder_build_start(d): | |||
127 | 127 | ||
128 | # now we will need to save the machine number | 128 | # now we will need to save the machine number |
129 | # we will override any previous numbers | 129 | # we will override any previous numbers |
130 | f = open(d.getVar('TMPDIR', True)+"/tinder-machine.id", 'w') | 130 | f = open(d.getVar('TMPDIR')+"/tinder-machine.id", 'w') |
131 | f.write(report) | 131 | f.write(report) |
132 | 132 | ||
133 | 133 | ||
@@ -137,8 +137,8 @@ def tinder_send_http(d, status, _log): | |||
137 | """ | 137 | """ |
138 | 138 | ||
139 | # get the body and type | 139 | # get the body and type |
140 | server = d.getVar('TINDER_HOST', True) | 140 | server = d.getVar('TINDER_HOST') |
141 | url = d.getVar('TINDER_URL', True) | 141 | url = d.getVar('TINDER_URL') |
142 | 142 | ||
143 | selector = url + "/xml/build_status.pl" | 143 | selector = url + "/xml/build_status.pl" |
144 | 144 | ||
@@ -278,7 +278,7 @@ def tinder_do_tinder_report(event): | |||
278 | 278 | ||
279 | try: | 279 | try: |
280 | # truncate the tinder log file | 280 | # truncate the tinder log file |
281 | f = open(event.data.getVar('TINDER_LOG', True), 'w') | 281 | f = open(event.data.getVar('TINDER_LOG'), 'w') |
282 | f.write("") | 282 | f.write("") |
283 | f.close() | 283 | f.close() |
284 | except: | 284 | except: |
@@ -287,7 +287,7 @@ def tinder_do_tinder_report(event): | |||
287 | try: | 287 | try: |
288 | # write a status to the file. This is needed for the -k option | 288 | # write a status to the file. This is needed for the -k option |
289 | # of BitBake | 289 | # of BitBake |
290 | g = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w') | 290 | g = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') |
291 | g.write("") | 291 | g.write("") |
292 | g.close() | 292 | g.close() |
293 | except IOError: | 293 | except IOError: |
@@ -296,10 +296,10 @@ def tinder_do_tinder_report(event): | |||
296 | # Append the Task-Log (compile,configure...) to the log file | 296 | # Append the Task-Log (compile,configure...) to the log file |
297 | # we will send to the server | 297 | # we will send to the server |
298 | if name == "TaskSucceeded" or name == "TaskFailed": | 298 | if name == "TaskSucceeded" or name == "TaskFailed": |
299 | log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task)) | 299 | log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T'), event.task)) |
300 | 300 | ||
301 | if len(log_file) != 0: | 301 | if len(log_file) != 0: |
302 | to_file = event.data.getVar('TINDER_LOG', True) | 302 | to_file = event.data.getVar('TINDER_LOG') |
303 | log += "".join(open(log_file[0], 'r').readlines()) | 303 | log += "".join(open(log_file[0], 'r').readlines()) |
304 | 304 | ||
305 | # set the right 'HEADER'/Summary for the TinderBox | 305 | # set the right 'HEADER'/Summary for the TinderBox |
@@ -310,16 +310,16 @@ def tinder_do_tinder_report(event): | |||
310 | elif name == "TaskFailed": | 310 | elif name == "TaskFailed": |
311 | log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task | 311 | log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task |
312 | elif name == "PkgStarted": | 312 | elif name == "PkgStarted": |
313 | log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF', True) | 313 | log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF') |
314 | elif name == "PkgSucceeded": | 314 | elif name == "PkgSucceeded": |
315 | log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF', True) | 315 | log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF') |
316 | elif name == "PkgFailed": | 316 | elif name == "PkgFailed": |
317 | if not event.data.getVar('TINDER_AUTOBUILD', True) == "0": | 317 | if not event.data.getVar('TINDER_AUTOBUILD') == "0": |
318 | build.exec_task('do_clean', event.data) | 318 | build.exec_task('do_clean', event.data) |
319 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF', True) | 319 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF') |
320 | status = 200 | 320 | status = 200 |
321 | # remember the failure for the -k case | 321 | # remember the failure for the -k case |
322 | h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w') | 322 | h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') |
323 | h.write("200") | 323 | h.write("200") |
324 | elif name == "BuildCompleted": | 324 | elif name == "BuildCompleted": |
325 | log += "Build Completed\n" | 325 | log += "Build Completed\n" |
@@ -342,7 +342,7 @@ def tinder_do_tinder_report(event): | |||
342 | log += "Error:Was Runtime: %d\n" % event.isRuntime() | 342 | log += "Error:Was Runtime: %d\n" % event.isRuntime() |
343 | status = 200 | 343 | status = 200 |
344 | # remember the failure for the -k case | 344 | # remember the failure for the -k case |
345 | h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w') | 345 | h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') |
346 | h.write("200") | 346 | h.write("200") |
347 | 347 | ||
348 | # now post the log | 348 | # now post the log |
@@ -360,7 +360,7 @@ python tinderclient_eventhandler() { | |||
360 | if e.data is None or bb.event.getName(e) == "MsgNote": | 360 | if e.data is None or bb.event.getName(e) == "MsgNote": |
361 | return | 361 | return |
362 | 362 | ||
363 | do_tinder_report = e.data.getVar('TINDER_REPORT', True) | 363 | do_tinder_report = e.data.getVar('TINDER_REPORT') |
364 | if do_tinder_report and do_tinder_report == "1": | 364 | if do_tinder_report and do_tinder_report == "1": |
365 | tinder_do_tinder_report(e) | 365 | tinder_do_tinder_report(e) |
366 | 366 | ||