diff options
author | Liu Wenlong <liuwl.fnst@cn.fujitsu.com> | 2018-11-21 15:17:57 +0800 |
---|---|---|
committer | Liu Wenlong <liuwl.fnst@cn.fujitsu.com> | 2018-11-21 15:24:20 +0800 |
commit | cc6cbf14507044fb5bf693c1c45818ba204884a5 (patch) | |
tree | 17ca27b581c14fa791d43ee28baeb46388e5114b /utils | |
parent | 72b2d1e7987be917b8e15194f55d7d408810e284 (diff) |
templates: add job generation support for iPXE based boardsguppy_6.99.1guppy/6.99.16.99.1
Since iPXE based boards can use NBD boot[1], now in releng-scripts,
we also add support to generate LAVA jobs for iPXE based boards.
With this support, Intel-UP2, one of the community reference boards, can
do validation tests with the generated jobs easily.
[1] https://git.lavasoftware.org/lava/lava/merge_requests/64/diffs
Change-Id: I9adce67d7e9207181675e82bf22a653c73682eb8
Signed-off-by: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/job-prereq.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/utils/job-prereq.py b/utils/job-prereq.py index 2dadc61..f688aca 100755 --- a/utils/job-prereq.py +++ b/utils/job-prereq.py @@ -13,13 +13,18 @@ FILE_MAP = { "nbdroot", } +FILE_MAP_X86 = { + "kernel", + "initrd", + "nbdroot", +} + # Mapping for qemu between command line QEMU args and LAVA yaml template file names FILE_MAP_QEMU = { "kernel": "kernel", "initrd": "ramdisk", } - def parse_cmdline(machines): description = "Print to stdout the file names needed to create a LAVA job" parser = argparse.ArgumentParser(description=description, @@ -51,15 +56,18 @@ def main(): url_version=args.build_type[2], machine=args.machine) job_yaml = yaml.load(job) - if args.machine != "qemux86-64": - for key in FILE_MAP: + if args.machine == "qemux86-64": + for key in FILE_MAP_QEMU: + if getattr(args, key): + print job_yaml["actions"][0]["deploy"]["images"][FILE_MAP_QEMU[key]].get("url").split('/')[-1] + elif args.machine == "intel-corei7-64": + for key in FILE_MAP_X86: if getattr(args, key): print job_yaml["actions"][0]["deploy"][key].get("url").split('/')[-1] else: - for key in FILE_MAP_QEMU: + for key in FILE_MAP: if getattr(args, key): - print job_yaml["actions"][0]["deploy"]["images"][FILE_MAP_QEMU[key]].get("url").split('/')[-1] - + print job_yaml["actions"][0]["deploy"][key].get("url").split('/')[-1] if __name__ == '__main__': main() |