tests/lcitool: Generate distribution packages list in JSON format
Add the generate_pkglist() helper to generate a list of packages required by a distribution to build QEMU. Since we can not add a "THIS FILE WAS AUTO-GENERATED" comment in JSON, create the files under tests/vm/generated/ sub-directory; add a README mentioning the files are generated. Suggested-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20230711144922.67491-2-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
94aaf6d8a5
commit
03e596de17
|
@ -84,6 +84,12 @@ def generate_cirrus(target, trailer=None):
|
||||||
generate(filename, cmd, trailer)
|
generate(filename, cmd, trailer)
|
||||||
|
|
||||||
|
|
||||||
|
def generate_pkglist(vm, target):
|
||||||
|
filename = Path(src_dir, "tests", "vm", "generated", vm + ".json")
|
||||||
|
cmd = lcitool_cmd + ["variables", "--format", "json", target, "qemu"]
|
||||||
|
generate(filename, cmd, None)
|
||||||
|
|
||||||
|
|
||||||
# Netmap still needs to be manually built as it is yet to be packaged
|
# Netmap still needs to be manually built as it is yet to be packaged
|
||||||
# into a distro. We also add cscope and gtags which are used in the CI
|
# into a distro. We also add cscope and gtags which are used in the CI
|
||||||
# test
|
# test
|
||||||
|
@ -191,6 +197,11 @@ try:
|
||||||
generate_cirrus("freebsd-13")
|
generate_cirrus("freebsd-13")
|
||||||
generate_cirrus("macos-12")
|
generate_cirrus("macos-12")
|
||||||
|
|
||||||
|
#
|
||||||
|
# VM packages lists
|
||||||
|
#
|
||||||
|
generate_pkglist("freebsd", "freebsd-13")
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(str(ex), file=sys.stderr)
|
print(str(ex), file=sys.stderr)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
# FILES IN THIS FOLDER WERE AUTO-GENERATED
|
||||||
|
#
|
||||||
|
# $ make lcitool-refresh
|
||||||
|
#
|
||||||
|
# https://gitlab.com/libvirt/libvirt-ci
|
Loading…
Reference in New Issue