diff options
author | Matt Hart <matthew.hart@linaro.org> | 2018-06-04 18:27:57 +0100 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-06-28 10:15:14 +0100 |
commit | 7f871342e044adaa11d65e5d799d8397b09beb4d (patch) | |
tree | cfe2991e7a44f5a10b15ec315f5bd61891cbaa77 /lava-v2-jobs-from-api.py | |
parent | 4fd1111479d2fdd9c172f4da0da981da3cd6d00b (diff) |
Pass the image shell prompt to the templates
Diffstat (limited to 'lava-v2-jobs-from-api.py')
-rwxr-xr-x | lava-v2-jobs-from-api.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lava-v2-jobs-from-api.py b/lava-v2-jobs-from-api.py index b3c0406..2bb7e76 100755 --- a/lava-v2-jobs-from-api.py +++ b/lava-v2-jobs-from-api.py @@ -143,6 +143,8 @@ def get_job_params(config, template, opts, device, build, defconfig, plan): nfsrootfs_url = None initrd_url = None + rootfs_prompt = "\(initramfs\)" + if 'kselftest' in plan: initrd_url = KSELFTEST_INITRD_URL.format(initrd_arch) else: @@ -150,12 +152,17 @@ def get_job_params(config, template, opts, device, build, defconfig, plan): if 'nfs' in plan: nfsrootfs_url = NFSROOTFS_URL.format(initrd_arch) initrd_url = None + rootfs_prompt = "/ #" if build['modules']: modules_url = urlparse.urljoin( storage, '/'.join([url_px, build['modules']])) else: modules_url = None + # hack for compatibility + if (initrd_url and 'buildroot' in initrd_url) or (nfsrootfs_url and 'buildroot' in nfsrootfs_url): + rootfs_prompt = "/ #" + device_type = device['device_type'] if device_type.startswith('qemu') or device_type == 'kvm': device_type = 'qemu' @@ -195,6 +202,7 @@ def get_job_params(config, template, opts, device, build, defconfig, plan): 'nfsrootfs_url': nfsrootfs_url, 'lab_name': config.get('lab'), 'context': device.get('context'), + 'rootfs_prompt': rootfs_prompt, } add_callback_params(job_params, config, plan) |