[Spice-devel] [PATCH spice] spice-options-test: Convert to gtest to catch criticals

Christophe Fergeau cfergeau at redhat.com
Mon Nov 7 16:40:00 UTC 2016


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Nov 03, 2016 at 01:30:07PM +0100, Pavel Grunt wrote:
> Fail on glib warnings instead of ignoring them
> 
> Signed-off-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  server/tests/spice-options-test.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/server/tests/spice-options-test.c b/server/tests/spice-options-test.c
> index e762461..72ec215 100644
> --- a/server/tests/spice-options-test.c
> +++ b/server/tests/spice-options-test.c
> @@ -26,7 +26,7 @@
>  #define g_assert_nonnull g_assert
>  #endif
>  
> -int main(int argc, char *argv[])
> +static void agent_options(void)
>  {
>      SpiceCoreInterface *core ;
>      SpiceServer *server = spice_server_new();
> @@ -49,6 +49,13 @@ int main(int argc, char *argv[])
>      spice_server_set_agent_file_xfer(server, 0);
>  
>      spice_server_destroy(server);
> +}
> +
> +int main(int argc, char *argv[])
> +{
> +    g_test_init(&argc, &argv, NULL);
> +
> +    g_test_add_func("/server/agent options", agent_options);
>  
> -    return 0;
> +    return g_test_run();
>  }
> -- 
> 2.10.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161107/d140fd46/attachment-0001.sig>


More information about the Spice-devel mailing list