static gboolean option_version = FALSE;
static gboolean option_quiet = FALSE;
static gboolean option_debug = FALSE;
+static gboolean option_list = FALSE;
static const char *option_prefix = NULL;
static void test_destroy(gpointer data)
return;
}
+ if (option_list) {
+ printf("%s\n", name);
+ if (destroy)
+ destroy(user_data);
+ return;
+ }
+
test = g_new0(struct test_case, 1);
test->name = g_strdup(name);
"Run tests without logging" },
{ "debug", 'd', 0, G_OPTION_ARG_NONE, &option_debug,
"Run tests with debug output" },
+ { "list", 'l', 0, G_OPTION_ARG_NONE, &option_list,
+ "Only list the tests to be run" },
{ "prefix", 'p', 0, G_OPTION_ARG_STRING, &option_prefix,
"Run tests matching provided prefix" },
{ NULL },
if (!main_loop)
return EXIT_FAILURE;
+ if (option_list) {
+ g_main_loop_unref(main_loop);
+ return EXIT_SUCCESS;
+ }
+
signal = setup_signalfd();
g_idle_add(start_tester, NULL);