r20107 - gnucash/trunk - Fix qof/test compilation errors, provide guard for glib_testing.

John Ralls jralls at code.gnucash.org
Sat Jan 15 14:11:42 EST 2011


Author: jralls
Date: 2011-01-15 14:11:42 -0500 (Sat, 15 Jan 2011)
New Revision: 20107
Trac: http://svn.gnucash.org/trac/changeset/20107

Modified:
   gnucash/trunk/configure.ac
   gnucash/trunk/src/libqof/qof/Makefile.am
   gnucash/trunk/src/libqof/qof/test/test-qofbook.c
   gnucash/trunk/src/libqof/qof/test/test-qofinstance.c
   gnucash/trunk/src/libqof/qof/test/test-qofsession.c
Log:
Fix qof/test compilation errors, provide guard for glib_testing.

Modified: gnucash/trunk/configure.ac
===================================================================
--- gnucash/trunk/configure.ac	2011-01-15 09:52:53 UTC (rev 20106)
+++ gnucash/trunk/configure.ac	2011-01-15 19:11:42 UTC (rev 20107)
@@ -200,6 +200,17 @@
   AC_MSG_RESULT(no)
 fi
 
+AC_MSG_CHECKING([for GLib testing (glib >= 2.16.0)])
+if $PKG_CONFIG 'glib-2.0 >= 2.16.0'
+then
+  AC_MSG_RESULT(yes)
+  _have_glib_testing=yes
+else
+  AC_MSG_RESULT(no)
+  _have_glib_testing=no
+fi
+AM_CONDITIONAL(HAVE_GLIB_TESTING, test "x$_have_glib_testing" = "xyes")
+
 AC_CHECK_HEADERS(dirent.h dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
 
 # Gnucash replaced dlopen/dlsym by the g_module functions; dlsym
@@ -1446,6 +1457,7 @@
   src/import-export/aqbanking/schemas/Makefile
   src/libqof/Makefile
   src/libqof/qof/Makefile
+  src/libqof/qof/test/Makefile
   src/optional/Makefile
   src/optional/python-bindings/Makefile
   src/optional/python-bindings/tests/Makefile

Modified: gnucash/trunk/src/libqof/qof/Makefile.am
===================================================================
--- gnucash/trunk/src/libqof/qof/Makefile.am	2011-01-15 09:52:53 UTC (rev 20106)
+++ gnucash/trunk/src/libqof/qof/Makefile.am	2011-01-15 19:11:42 UTC (rev 20107)
@@ -1,4 +1,8 @@
-#SUBDIRS = test
+if HAVE_GLIB_TESTING
+SUBDIRS = . test
+else
+SUBDIRS = .
+endif
 
 lib_LTLIBRARIES = libgnc-qof.la
 

Modified: gnucash/trunk/src/libqof/qof/test/test-qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofbook.c	2011-01-15 09:52:53 UTC (rev 20106)
+++ gnucash/trunk/src/libqof/qof/test/test-qofbook.c	2011-01-15 19:11:42 UTC (rev 20107)
@@ -25,6 +25,7 @@
 #include <qof.h>
 
 static const gchar *suitename = "/qof/qofbook";
+void test_suite_qofbook ( void );
 
 typedef struct
 {

Modified: gnucash/trunk/src/libqof/qof/test/test-qofinstance.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofinstance.c	2011-01-15 09:52:53 UTC (rev 20106)
+++ gnucash/trunk/src/libqof/qof/test/test-qofinstance.c	2011-01-15 19:11:42 UTC (rev 20107)
@@ -24,6 +24,7 @@
 #include <qof.h>
 
 static const gchar *suitename = "/qof/qofinstance";
+void test_suite_qofinstance ( void );
 
 typedef struct
 {

Modified: gnucash/trunk/src/libqof/qof/test/test-qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-qofsession.c	2011-01-15 09:52:53 UTC (rev 20106)
+++ gnucash/trunk/src/libqof/qof/test/test-qofsession.c	2011-01-15 19:11:42 UTC (rev 20107)
@@ -27,6 +27,7 @@
 #include <qofsession-p.h>
 
 static const gchar *suitename = "/qof/qofsession";
+void test_suite_qofsession ( void );
 
 typedef struct
 {
@@ -69,7 +70,7 @@
     g_assert( NULL == qof_session_get_url( fixture->session ));
 }
 
-GTestSuite*
+void
 test_suite_qofsession ( void )
 {
     g_test_add( suitename, Fixture, NULL, setup, test_session_safe_save, teardown );



More information about the gnucash-changes mailing list