Skip to content

Commit

Permalink
Remove QSF
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19099 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed May 4, 2010
1 parent 36a9a2e commit 70f08de
Show file tree
Hide file tree
Showing 51 changed files with 60 additions and 9,269 deletions.
7 changes: 0 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,8 @@ if test x$QOF_XML_DIR = x; then
QOF_LIBS='${top_builddir}/src/libqof/qof/libgnc-qof.la'
QOF_VERSION="internal"
QOF_PREFIX="internal"
QOF_XML_DIR='${pkgdatadir}/xml/qsf'
LIBQOF_LIBRARY_VERSION=1:4:0
LIBQOF_BACKEND_QSF_LIBRARY_VERSION=0:3:0
AC_SUBST(LIBQOF_LIBRARY_VERSION)
AC_SUBST(LIBQOF_BACKEND_QSF_LIBRARY_VERSION)
AC_DEFINE(HAVE_LIBQOF,,[We will use the internal QOF code])
HAVE_LIBQOF="use_internal"
fi
Expand All @@ -566,7 +563,6 @@ AC_SUBST(QOF_LIBS)
AS_SCRUB_INCLUDE(QOF_PREFIX)
AC_SUBST(QOF_PREFIX)
AC_SUBST(QOF_LIB_DIR)
AC_SUBST(QOF_XML_DIR)

AC_DEFINE(QOF_DISABLE_DEPRECATED,1, [Don't use deprecated qof functions])

Expand Down Expand Up @@ -1449,12 +1445,9 @@ AC_CONFIG_FILES(po/Makefile.in
src/import-export/hbci/test/Makefile
src/libqof/Makefile
src/libqof/qof/Makefile
src/libqof/backend/Makefile
src/libqof/backend/file/Makefile
src/optional/Makefile
src/optional/python-bindings/Makefile
src/optional/python-bindings/tests/Makefile
src/optional/xsl/Makefile
src/pixmaps/Makefile
src/quotes/Makefile
src/register/Makefile
Expand Down
1 change: 0 additions & 1 deletion src/backend/dbi/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ AM_CFLAGS = \
-I${top_srcdir}/src/test-core \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/engine/test-core \
-I${top_srcdir}/src/backend/qsf \
-I${top_srcdir}/src/libqof/qof \
-DTEST_MYSQL_URL=\"${TEST_MYSQL_URL}\" \
-DTEST_PGSQL_URL=\"${TEST_PGSQL_URL}\" \
Expand Down
3 changes: 0 additions & 3 deletions src/backend/xml/gnc-backend-xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ typedef enum
GNC_BOOK_XML1_FILE,
GNC_BOOK_XML2_FILE,
GNC_BOOK_XML2_FILE_NO_ENCODING,
QSF_GNC_OBJECT,
QSF_OBJECT,
QSF_MAP,
} QofBookFileType;

/* ================================================================= */
Expand Down
1 change: 0 additions & 1 deletion src/backend/xml/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/engine/test-core \
-I${top_srcdir}/src/backend/xml \
-I${top_srcdir}/src/backend/qsf \
-I${top_srcdir}/src/libqof/qof \
${LIBXML2_CFLAGS} \
${GLIB_CFLAGS} \
Expand Down
2 changes: 1 addition & 1 deletion src/business/business-core/sql/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GNC_TEST_DEPS = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/backend\sql
--library-dir ${top_builddir}/src/backend/sql

TESTS_ENVIRONMENT = \
GNC_ACCOUNT_PATH=${top_srcdir}/accounts/C \
Expand Down
5 changes: 4 additions & 1 deletion src/business/business-core/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/business/business-core \
-I${top_srcdir}/src/libqof/qof \
-I${top_srcdir}/src/backend/xml \
${GUILE_INCS} \
${GLIB_CFLAGS}

Expand All @@ -15,6 +16,7 @@ LDADD = \
${top_builddir}/src/engine/libgncmod-engine.la \
../libgncmod-business-core.la \
${top_builddir}/src/libqof/qof/libgnc-qof.la \
${top_builddir}/src/backend/xml/libgncmod-backend-xml.la \
${GLIB_LIBS}

TESTS = \
Expand All @@ -36,7 +38,8 @@ GNC_TEST_DEPS = \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/business/business-core
--library-dir ${top_builddir}/src/business/business-core \
--library-dir ${top_builddir}/src/backend/xml

TESTS_ENVIRONMENT = \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Expand Down
12 changes: 9 additions & 3 deletions src/business/business-core/test/test-customer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#include "gncJobP.h"
#include "test-stuff.h"

#include "gnc-backend-xml.h"

#define FILE_NAME "xml:///tmp/testbook.gnucash"
#define GNC_LIB_NAME "gncmod-backend-xml"

static int count = 0;

static void
Expand Down Expand Up @@ -60,14 +65,14 @@ test_customer (void)

session = qof_session_new();
be = NULL;
qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
qof_session_begin(session, FILE_NAME, FALSE, FALSE);
book = qof_session_get_book(session);
be = qof_book_get_backend(book);

/* The book *must* have a backend to pass the test of the 'dirty' flag
so use a session to use the default QSF. However, until the SQL backend can be used,
so use a session to use the default XML. However, until the SQL backend can be used,
entities remain dirty until the session is saved or closed. */
do_test (be != NULL, "qsf backend could not be set");
do_test (be != NULL, "xml backend could not be set");

/* Test creation/destruction */
{
Expand Down Expand Up @@ -210,6 +215,7 @@ int
main (int argc, char **argv)
{
qof_init();
qof_load_backend_library ("../../../backend/xml/.libs/", GNC_LIB_NAME);
do_test (cashobjects_register(), "Cannot register cash objects");
do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
do_test (gncJobRegister (), "Cannot register GncJob");
Expand Down
13 changes: 10 additions & 3 deletions src/business/business-core/test/test-employee.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#include "gncInvoiceP.h"
#include "test-stuff.h"

#include "gnc-backend-xml.h"

#define FILE_NAME "xml:///tmp/testbook.gnucash"
#define GNC_LIB_NAME "gncmod-backend-xml"

static int count = 0;

static void
Expand Down Expand Up @@ -66,12 +71,13 @@ test_employee (void)
GncEmployee *employee;

session = qof_session_new();
qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
qof_session_begin(session, FILE_NAME, FALSE, FALSE);
book = qof_session_get_book(session);
be = qof_book_get_backend (book);

/* The book *must* have a backend to pass the test of the 'dirty' flag */
/* See the README file for details */

be = qof_book_get_backend (book);
do_test (be != NULL, "xml backend could not be set");

/* Test creation/destruction */
{
Expand Down Expand Up @@ -220,6 +226,7 @@ int
main (int argc, char **argv)
{
qof_init();
qof_load_backend_library ("../../../backend/xml/.libs/", GNC_LIB_NAME);
do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
do_test (gncJobRegister (), "Cannot register GncJob");
do_test (gncCustomerRegister(), "Cannot register GncCustomer");
Expand Down
10 changes: 8 additions & 2 deletions src/business/business-core/test/test-job.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#include "gncOwner.h"
#include "test-stuff.h"

#include "gnc-backend-xml.h"

#define FILE_NAME "xml:///tmp/testbook.gnucash"
#define GNC_LIB_NAME "gncmod-backend-xml"

static int count = 0;

static void
Expand Down Expand Up @@ -69,13 +74,13 @@ test_job (void)

session = qof_session_new();
be = NULL;
qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
qof_session_begin(session, FILE_NAME, FALSE, FALSE);
book = qof_session_get_book (session);
be = qof_book_get_backend(book);

/* The book *must* have a backend to pass the test of the 'dirty' flag */
/* See the README file for details */
do_test (be != NULL, "qsf backend could not be set");
do_test (be != NULL, "xml backend could not be set");

/* Test creation/destruction */
{
Expand Down Expand Up @@ -241,6 +246,7 @@ int
main (int argc, char **argv)
{
qof_init();
qof_load_backend_library ("../../../backend/xml/.libs/", GNC_LIB_NAME);
do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
do_test (gncJobRegister (), "Cannot register GncJob");
do_test (gncCustomerRegister(), "Cannot register GncCustomer");
Expand Down
10 changes: 8 additions & 2 deletions src/business/business-core/test/test-vendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
#include "gncVendorP.h"
#include "test-stuff.h"

#include "gnc-backend-xml.h"

#define FILE_NAME "xml:///tmp/testbook.gnucash"
#define GNC_LIB_NAME "gncmod-backend-xml"

static int count = 0;

static void
Expand Down Expand Up @@ -68,13 +73,13 @@ test_vendor (void)

session = qof_session_new();
be = NULL;
qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
qof_session_begin(session, FILE_NAME, FALSE, FALSE);
book = qof_session_get_book (session);
be = qof_book_get_backend(book);

/* The book *must* have a backend to pass the test of the 'dirty' flag */
/* See the README file for details */
do_test (be != NULL, "qsf backend could not be set");
do_test (be != NULL, "xml backend could not be set");

/* Test creation/destruction */
{
Expand Down Expand Up @@ -222,6 +227,7 @@ int
main (int argc, char **argv)
{
qof_init();
qof_load_backend_library ("../../../backend/xml/.libs/", GNC_LIB_NAME);
do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
do_test (gncJobRegister (), "Cannot register GncJob");
do_test (gncCustomerRegister(), "Cannot register GncCustomer");
Expand Down
Loading

0 comments on commit 70f08de

Please sign in to comment.