[libvirt] [PATCH 4/5] tests: don't test json when not compiled in
Michal Privoznik
mprivozn at redhat.com
Mon Feb 25 10:38:46 UTC 2013
On 23.02.2013 00:09, Eric Blake wrote:
> Now that the segfault is solved, we can skip instead of fail
> the test when yajl is not present.
>
> * tests/qemumonitorjsontest.c (mymain): Skip if no yajl.
> ---
> tests/qemumonitorjsontest.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
> index 55032d6..e2f8cb1 100644
> --- a/tests/qemumonitorjsontest.c
> +++ b/tests/qemumonitorjsontest.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (C) 2011-2012 Red Hat, Inc.
> + * Copyright (C) 2011-2013 Red Hat, Inc.
> *
> * This library is free software; you can redistribute it and/or
> * modify it under the terms of the GNU Lesser General Public
> @@ -444,2 +443,2 @@ mymain(void)
> int ret = 0;
> virCapsPtr caps;
>
> +#if !WITH_YAJL
> + fprintf(stderr, "libvirt not compiled with yajl, skipping");
> + return EXIT_AM_SKIP;
> +#endif
> +
> if (virThreadInitialize() < 0)
> exit(EXIT_FAILURE);
>
ACK
Michal
More information about the libvir-list
mailing list