From 3d69cca57a3017e2e52e1d6585454b507e5c874a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 29 Mar 2011 16:28:02 +0100 Subject: [PATCH 1/4] dbus-glib-tool: remove regression-test boilerplate which does nothing --- dbus/dbus-glib-tool.c | 48 ------------------------------------------------ 1 files changed, 0 insertions(+), 48 deletions(-) diff --git a/dbus/dbus-glib-tool.c b/dbus/dbus-glib-tool.c index 8f2019f..e0ac8a7 100644 --- a/dbus/dbus-glib-tool.c +++ b/dbus/dbus-glib-tool.c @@ -38,10 +38,6 @@ #include #include -#ifdef DBUS_BUILD_TESTS -static void run_all_tests (const char *test_data_dir); -#endif - typedef enum { DBUS_BINDING_OUTPUT_NONE, DBUS_BINDING_OUTPUT_PRETTY, @@ -312,10 +308,6 @@ main (int argc, char **argv) version (); else if (strcmp (arg, "--force") == 0) force = TRUE; -#ifdef DBUS_BUILD_TESTS - else if (strcmp (arg, "--self-test") == 0) - run_all_tests (NULL); -#endif /* DBUS_BUILD_TESTS */ else if (strncmp (arg, "--mode=", 7) == 0) { const char *mode = arg + 7; @@ -454,43 +446,3 @@ main (int argc, char **argv) return 0; } - - -#ifdef DBUS_BUILD_TESTS -static void -test_die (const char *failure) -{ - lose ("Unit test failed: %s", failure); -} - -/** - * @ingroup DBusGTool - * Unit test for GLib utility tool - * Returns: #TRUE on success. - */ -static gboolean -_dbus_gtool_test (const char *test_data_dir) -{ - - return TRUE; -} - -static void -run_all_tests (const char *test_data_dir) -{ - if (test_data_dir == NULL) - test_data_dir = g_getenv ("DBUS_TEST_DATA"); - - if (test_data_dir != NULL) - printf ("Test data in %s\n", test_data_dir); - else - printf ("No test data!\n"); - - printf ("%s: running binding tests\n", "dbus-binding-tool"); - if (!_dbus_gtool_test (test_data_dir)) - test_die ("gtool"); - - printf ("%s: completed successfully\n", "dbus-binding-tool"); -} - -#endif /* DBUS_BUILD_TESTS */ -- 1.7.5.3