On 12/01/2010 07:56 AM, Jiri Denemark wrote: > --- > diff --git a/tests/qemuxml2argvdata/qemu.sh b/tests/qemuxml2argvdata/qemu.sh > new file mode 100755 > index 0000000..6d5d354 > --- /dev/null > +++ b/tests/qemuxml2argvdata/qemu.sh > @@ -0,0 +1,64 @@ > +#! /bin/sh
> +real_qemu()
> +{
> + if test x$qemu != x; then
> + exec $qemu "$@"
> + else
> + return 1
> + fi
> +}
> +
> +faked_machine()
> +{
> + echo "pc"
> +}
> +case $* in
> +"-M ?")
> + faked_machine
> + ;;
> +"-cpu ?")
> + faked_cpu
> + ;;
> +*)
> + real_qemu "$@"
> + ;;
> +esac
Nice - you can control the output of possible machines and cpus, even if
a qemu upgrade gains support for more names later.
> @@ -223,6 +226,10 @@ mymain(int argc, char **argv)
> if (!abs_srcdir)
> abs_srcdir = getcwd(cwd, sizeof(cwd));
>
> + abs_top_srcdir = getenv("abs_top_srcdir");
> + if (!abs_top_srcdir)
> + abs_top_srcdir = "..";
Not really absolute, is it? But it matches other tests, and does the
job, so no need to change it.
ACK.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
