gnucash maint: Fix adjust_sql_option_string test on Windows.

John Ralls jralls at code.gnucash.org
Fri May 20 13:05:08 EDT 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/f7dfd65b (commit)
	from  https://github.com/Gnucash/gnucash/commit/592ad99d (commit)



commit f7dfd65bf9f2cb441bdb2d8767f3bcdbe0319b53
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri May 20 17:02:01 2016 +0000

    Fix adjust_sql_option_string test on Windows.
    
    The linkage problem was caused by the symbol appearing in
    libgncmod-backend-dbi.dll but not libgncmod-backend-dbi.dll.a.
    Incoprorating gnc-backend-dbi.c as a source file to the test program
    instead of linking its library resolved the issue.

diff --git a/src/backend/dbi/test/Makefile.am b/src/backend/dbi/test/Makefile.am
index 8c5332c..58aeb20 100644
--- a/src/backend/dbi/test/Makefile.am
+++ b/src/backend/dbi/test/Makefile.am
@@ -23,7 +23,6 @@ LDADD = ${top_builddir}/src/test-core/libtest-core.la \
         ${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
         ${top_builddir}/src/core-utils/libgnc-core-utils.la \
         ${top_builddir}/src/libqof/qof/libgnc-qof.la \
-        ../libgncmod-backend-dbi.la \
         ${top_builddir}/src/backend/sql/libgnc-backend-sql.la \
         ${top_builddir}/src/backend/xml/libgnc-backend-xml-utils.la \
         ${top_builddir}/lib/libc/libc-missing.la
@@ -62,7 +61,8 @@ test_backend_dbi_SOURCES = \
     test-backend-dbi.c \
     test-backend-dbi-basic.c \
     test-dbi-stuff.c \
-    test-dbi-business-stuff.c
+    test-dbi-business-stuff.c \
+    ../gnc-backend-dbi.c
 
 test_backend_dbi_LDFLAGS="-ldbi"
 test_backend_dbi_CPPFLAGS = \
diff --git a/src/backend/dbi/test/test-backend-dbi-basic.c b/src/backend/dbi/test/test-backend-dbi-basic.c
index 04cf131..ef37dc1 100644
--- a/src/backend/dbi/test/test-backend-dbi-basic.c
+++ b/src/backend/dbi/test/test-backend-dbi-basic.c
@@ -594,7 +594,7 @@ test_dbi_business_store_and_reload (Fixture *fixture, gconstpointer pData)
     qof_session_end (session_3);
     qof_session_destroy (session_3);
 }
-#ifndef G_OS_WIN32
+
 static void
 test_adjust_sql_options_string (void)
 {
@@ -630,7 +630,7 @@ test_adjust_sql_options_string (void)
         g_free (adjusted_str);
     }
 }
-#endif //G_OS_WIN32
+
 static void
 create_dbi_test_suite (gchar *dbm_name, gchar *url)
 {
@@ -675,8 +675,7 @@ test_suite_gnc_backend_dbi (void)
         g_setenv ("PGOPTIONS", "-c client_min_messages=WARNING", FALSE);
         create_dbi_test_suite ("postgres", TEST_PGSQL_URL);
     }
-#ifndef G_OS_WIN32
+
     GNC_TEST_ADD_FUNC( suitename, "adjust sql options string localtime", 
         test_adjust_sql_options_string );
-#endif //G_OS_WIN32
 }



Summary of changes:
 src/backend/dbi/test/Makefile.am              | 4 ++--
 src/backend/dbi/test/test-backend-dbi-basic.c | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list