[gnome-keyring/dbus-api: 1/7] [daemon] When --enable-tests, make warnings fatal.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring/dbus-api: 1/7] [daemon] When --enable-tests, make warnings fatal.
- Date: Mon, 9 Nov 2009 17:12:13 +0000 (UTC)
commit ae5cc35d7abf538cbe678e2554926e53c031b2a0
Author: Stef Walter <stef memberwebs com>
Date: Sun Nov 8 18:35:29 2009 +0000
[daemon] When --enable-tests, make warnings fatal.
When running daemon, make dbus and glib warnings fatal if the
project was configured with --enable-tests.
configure.in | 2 +-
daemon/gkr-daemon.c | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0c97846..9061812 100644
--- a/configure.in
+++ b/configure.in
@@ -435,7 +435,7 @@ AC_ARG_ENABLE(tests,
AC_MSG_CHECKING([build test tools, unit tests, and -Werror])
if test "$enable_tests" = "yes"; then
- AC_DEFINE_UNQUOTED(WITH_TESTS, 1, [Build with unit test support])
+ AC_DEFINE_UNQUOTED(WITH_TESTS, 1, [Build with internal tests and unit tests])
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -Werror"
tests_status="yes"
diff --git a/daemon/gkr-daemon.c b/daemon/gkr-daemon.c
index c91522e..feb3d0d 100644
--- a/daemon/gkr-daemon.c
+++ b/daemon/gkr-daemon.c
@@ -771,7 +771,13 @@ main (int argc, char *argv[])
* Without either of these options, we follow a more boring and
* predictable startup.
*/
-
+
+#ifdef WITH_TESTS
+ g_setenv ("DBUS_FATAL_WARNINGS", "1", FALSE);
+ if (!g_getenv ("G_DEBUG"))
+ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+#endif
+
g_type_init ();
g_thread_init (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]