mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies
Bios bits avocado tests need mformat (provided by the mtools package) and xorriso tools in order to run within gitlab CI containers. Add those dependencies within the Dockerfiles so that containers can be built with those tools present and bios bits avocado tests can be run there. xorriso package conflicts with genisoimage package on some distributions. Therefore, it is not possible to have both the packages at the same time in the container image uniformly for all distribution flavors. Further, on some distributions like RHEL, both xorriso and genisoimage packages provide /usr/bin/genisoimage and on some other distributions like Fedora, only genisoimage package provides the same utility. Therefore, this change removes the dependency on geninsoimage for building container images altogether keeping only xorriso package. At the same time, cdrom-test.c is updated to use and check for existence of only xorrisofs. Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20230504154611.85854-3-anisinha@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
a19b119bd7
commit
da9000784c
21 changed files with 45 additions and 27 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
static char isoimage[] = "cdrom-boot-iso-XXXXXX";
|
||||
|
||||
static int exec_genisoimg(const char **args)
|
||||
static int exec_xorrisofs(const char **args)
|
||||
{
|
||||
gchar *out_err = NULL;
|
||||
gint exit_status = -1;
|
||||
|
@ -43,7 +43,7 @@ static int prepare_image(const char *arch, char *isoimage)
|
|||
char *codefile = NULL;
|
||||
int ifh, ret = -1;
|
||||
const char *args[] = {
|
||||
"genisoimage", "-quiet", "-l", "-no-emul-boot",
|
||||
"xorrisofs", "-quiet", "-l", "-no-emul-boot",
|
||||
"-b", NULL, "-o", isoimage, srcdir, NULL
|
||||
};
|
||||
|
||||
|
@ -75,9 +75,9 @@ static int prepare_image(const char *arch, char *isoimage)
|
|||
}
|
||||
|
||||
args[5] = strchr(codefile, '/') + 1;
|
||||
ret = exec_genisoimg(args);
|
||||
ret = exec_xorrisofs(args);
|
||||
if (ret) {
|
||||
fprintf(stderr, "genisoimage failed: %i\n", ret);
|
||||
fprintf(stderr, "xorrisofs failed: %i\n", ret);
|
||||
}
|
||||
|
||||
unlink(codefile);
|
||||
|
@ -211,12 +211,12 @@ int main(int argc, char **argv)
|
|||
{
|
||||
int ret;
|
||||
const char *arch = qtest_get_arch();
|
||||
const char *genisocheck[] = { "genisoimage", "-version", NULL };
|
||||
const char *xorrisocheck[] = { "xorrisofs", "-version", NULL };
|
||||
|
||||
g_test_init(&argc, &argv, NULL);
|
||||
|
||||
if (exec_genisoimg(genisocheck)) {
|
||||
/* genisoimage not available - so can't run tests */
|
||||
if (exec_xorrisofs(xorrisocheck)) {
|
||||
/* xorrisofs not available - so can't run tests */
|
||||
return g_test_run();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue