Don't try to compile test_adjust_sql_options on windows, it won't link.

Also fix the CMake build by linking gnc-backend-dbi for test-backend-dbi.
This commit is contained in:
John Ralls 2016-05-14 20:33:28 +00:00
parent 3b17b44ef7
commit c1ad6154ab
2 changed files with 6 additions and 5 deletions

View File

@ -11,7 +11,7 @@ SET(BACKEND_DBI_TEST_INCLUDE_DIRS
${LIBDBI_INCLUDE_PATH}
${GLIB2_INCLUDE_DIRS}
)
SET(BACKEND_DBI_TEST_LIBS gnc-backend-sql gncmod-engine gncmod-test-engine gnc-qof test-core ${LIBDBI_LIBRARY})
SET(BACKEND_DBI_TEST_LIBS gnc-backend-sql gnc-backend-dbi gncmod-engine gncmod-test-engine gnc-qof test-core ${LIBDBI_LIBRARY})
SET(test_dbi_backend_SOURCES
test-backend-dbi.c
@ -31,4 +31,4 @@ IF (NOT WIN32)
TEST_PGSQL_URL=\"${TEST_PGSQL_URL}\"
DBI_TEST_XML_FILENAME=\"${CMAKE_CURRENT_SOURCE_DIR}/test-dbi.xml\"
)
ENDIF()
ENDIF()

View File

@ -596,7 +596,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)
{
@ -632,7 +632,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)
{
@ -677,7 +677,8 @@ 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
}