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.
This commit is contained in:
John Ralls
2016-05-20 17:02:01 +00:00
parent 592ad99dde
commit f7dfd65bf9
2 changed files with 5 additions and 6 deletions

View File

@@ -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 = \

View File

@@ -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
}