Message ID | 20230531200906.17790-4-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | tests/vm/freebsd: Get up-to-date package list from lcitool | expand |
On Wed, May 31, 2023 at 10:09:06PM +0200, Philippe Mathieu-Daudé wrote: > See previous commit for rationale on using lcitool vars file to > get an up-to-date package list. Since there is a such file generated > for FreeBSD 13 available in the repository, use it. That way we > don't need to manually keep this array in sync. > > Inspired-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > tests/vm/freebsd | 44 ++++---------------------------------------- > 1 file changed, 4 insertions(+), 40 deletions(-) > > diff --git a/tests/vm/freebsd b/tests/vm/freebsd > index 6a0d7a4569..4f12878645 100755 > --- a/tests/vm/freebsd > +++ b/tests/vm/freebsd > @@ -31,45 +31,7 @@ class FreeBSDVM(basevm.BaseVM): > link = "https://download.freebsd.org/releases/CI-IMAGES/13.2-RELEASE/amd64/Latest/FreeBSD-13.2-RELEASE-amd64-BASIC-CI.raw.xz" > csum = "a4fb3b6c7b75dd4d58fb0d75e4caf72844bffe0ca00e66459c028b198ffb3c0e" > size = "20G" > - pkgs = [ > - # build tools > - "git", > - "pkgconf", > - "bzip2", > - "python39", > - "ninja", > - > - # gnu tools > - "bash", > - "gmake", > - "gsed", > - "gettext", > - > - # libs: crypto > - "gnutls", > - > - # libs: images > - "jpeg-turbo", > - "png", > - > - # libs: ui > - "sdl2", > - "gtk3", > - "libxkbcommon", > - > - # libs: opengl > - "libepoxy", > - "mesa-libs", > - > - # libs: migration > - "zstd", > - > - # libs: networking > - "libslirp", > - > - # libs: sndio > - "sndio", > - ] > + lcitool_vars = ".gitlab-ci.d/cirrus/freebsd-13.vars" So we have various other distros in the tests/vm/ directory, for which we have lcitool support, but for which there's no existing vars file. I'm wondering if we're better off just putting the data files we need directly in the tests/vm/ directory, and keeping it indepenant of the cirrus CI data files. It is all auto-generated, so the duplication would not be a maint burden. eg just have a 'freebsd.json' file, alongside the 'freebsd' script. We should also expand lcitool to cover haiku, netbsd and openbsd distros one day. With regards, Daniel
diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 6a0d7a4569..4f12878645 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -31,45 +31,7 @@ class FreeBSDVM(basevm.BaseVM): link = "https://download.freebsd.org/releases/CI-IMAGES/13.2-RELEASE/amd64/Latest/FreeBSD-13.2-RELEASE-amd64-BASIC-CI.raw.xz" csum = "a4fb3b6c7b75dd4d58fb0d75e4caf72844bffe0ca00e66459c028b198ffb3c0e" size = "20G" - pkgs = [ - # build tools - "git", - "pkgconf", - "bzip2", - "python39", - "ninja", - - # gnu tools - "bash", - "gmake", - "gsed", - "gettext", - - # libs: crypto - "gnutls", - - # libs: images - "jpeg-turbo", - "png", - - # libs: ui - "sdl2", - "gtk3", - "libxkbcommon", - - # libs: opengl - "libepoxy", - "mesa-libs", - - # libs: migration - "zstd", - - # libs: networking - "libslirp", - - # libs: sndio - "sndio", - ] + lcitool_vars = ".gitlab-ci.d/cirrus/freebsd-13.vars" BUILD_SCRIPT = """ set -e; @@ -151,8 +113,10 @@ class FreeBSDVM(basevm.BaseVM): self.console_wait(prompt) self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") + vars_path = os.path.join(src_path, self.lcitool_vars) + pkgs = basevm.get_qemu_packages_from_lcitool_vars(vars_path) self.print_step("Installing packages") - self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) + self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs)) # shutdown self.ssh_root(self.poweroff)
See previous commit for rationale on using lcitool vars file to get an up-to-date package list. Since there is a such file generated for FreeBSD 13 available in the repository, use it. That way we don't need to manually keep this array in sync. Inspired-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- tests/vm/freebsd | 44 ++++---------------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-)