From 28a8c714eadccf0b8dbc14efd5629c61d15bf227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 12 Jan 2017 13:52:52 +0800 Subject: [PATCH] unit-tests: Pass argc/argv directly to g_test_init Don't let a dummy option context consume the arguments; just let the GLib test suite do it. It'll handle the basic command line arguments and allow doing things such as specifying what test to run. https://bugzilla.gnome.org/show_bug.cgi?id=777732 --- src/tests/unit-tests.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/tests/unit-tests.c b/src/tests/unit-tests.c index 7b7818c07..c70a7b085 100644 --- a/src/tests/unit-tests.c +++ b/src/tests/unit-tests.c @@ -207,20 +207,6 @@ init_tests (int argc, char **argv) int main (int argc, char *argv[]) { - GOptionContext *ctx; - GError *error = NULL; - - ctx = g_option_context_new (NULL); - - if (!g_option_context_parse (ctx, - &argc, &argv, &error)) - { - g_printerr ("%s", error->message); - return 1; - } - - g_option_context_free (ctx); - init_tests (argc, argv); meta_plugin_manager_load ("default");