summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-09-25 18:56:29 +0100
committerFathi Boudra <fathi.boudra@linaro.org>2015-10-08 08:30:11 +0300
commitf40e681f8c89132f8898682e32fc9e284045665b (patch)
tree9e5aea6eb04f029de824ca73197d1e7691a8f7e5
parente5eadbe64d4b654e3976077e60da4d89b9b9a341 (diff)
downloadpost-build-lava-f40e681f8c89132f8898682e32fc9e284045665b.tar.gz
Dump roles of sub-jobs on multinode job
Change-Id: I2a4292d4f5934475e7ba18cd0eaefb196fb1233a Signed-off-by: Bernie Ogden <bernie.ogden@linaro.org>
-rwxr-xr-xpost-build-lava.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/post-build-lava.py b/post-build-lava.py
index 7dc5159..694000a 100755
--- a/post-build-lava.py
+++ b/post-build-lava.py
@@ -166,12 +166,21 @@ def lava_submit(config, lava_server):
lava_token=lava_token,
lava_server=lava_server))
lava_job_id = server.scheduler.submit_job(config)
+ print 'LAVA Job Id: %s, URL: http://%s/scheduler/job/%s' % \
+ (lava_job_id, lava_server_root, lava_job_id)
+ try:
+ lava_sub_job_defs = map(lambda sub_job: json.loads(server.scheduler.job_details(sub_job)['definition']),
+ lava_job_id)
+ lava_sub_job_roles = collections.OrderedDict(
+ map(lambda sub_job_def: [sub_job_def['sub_id'], sub_job_def['role']], lava_sub_job_defs))
+ print 'LAVA Sub-Jobs: %s' % ','.join(
+ map(lambda sub_job: sub_job + ':' + lava_sub_job_roles[sub_job], lava_sub_job_roles))
+ except TypeError:
+ pass
except xmlrpclib.ProtocolError, e:
print 'Error making a LAVA request:', obfuscate_credentials(str(e))
sys.exit(1)
- print 'LAVA Job Id: %s, URL: http://%s/scheduler/job/%s' % \
- (lava_job_id, lava_server_root, lava_job_id)
json.dump({'lava_url': 'http://' + lava_server_root,
'job_id': lava_job_id}, open('lava-job-info', 'w'))
else:
@@ -437,7 +446,7 @@ def main():
hwpack_job_name,
hwpack_build_number),
'device_type': device_type,
- }, indent=2, separators=(',', ': '))
+ }, indent=2, separators=(',', ': '))
lava_submit(config, lava_server)