[grisbi-cvs] grisbi/src main_cunit.c, NONE, 1.1 main_cunit.h, NONE, 1.1 Makefile.am, 1.155, 1.156 main.c, 1.145, 1.146
Mickaƫl Remars
mykeul at users.sourceforge.net
Fri May 22 20:43:35 CEST 2009
- Previous message: [grisbi-cvs] grisbi configure.in,1.78,1.79
- Next message: [grisbi-cvs] grisbi/src gsb_data_account_cunit.c, NONE, 1.1 gsb_data_account_cunit.h, NONE, 1.1 gsb_data_account.c, 1.76, 1.77 gsb_data_account.h, 1.35, 1.36 main_cunit.c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15525/grisbi/src
Modified Files:
Makefile.am main.c
Added Files:
main_cunit.c main_cunit.h
Log Message:
cunit tests are now disabled by default. They can be enabled by passing the --with-cunit argument to configure.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/Makefile.am,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- Makefile.am 21 May 2009 09:42:53 -0000 1.155
+++ Makefile.am 22 May 2009 18:43:32 -0000 1.156
@@ -1,12 +1,12 @@
# Process this file with automake to produce Makefile.in
localedir = $(datadir)/locale
-INCLUDES = -I$(top_srcdir) -I$(includedir) -I../intl -DHAVE_CUNIT -DLOCALEDIR=\"$(localedir)\" -DPIXMAPS_DIR="\"$(datadir)/pixmaps/@PACKAGE@\"" -DPLUGINS_DIR="\"$(prefix)/lib/@PACKAGE@\"" -DLOGO_PATH="\"$(datadir)/pixmaps/@PACKAGE@/grisbi-logo.png\"" -DDATA_PATH="\"$(datadir)/@PACKAGE@\"" -DHELP_PATH="\"$(datadir)/doc/@PACKAGE@\"" -Wall
+INCLUDES = -I$(top_srcdir) -I$(includedir) -I../intl -DLOCALEDIR=\"$(localedir)\" -DPIXMAPS_DIR="\"$(datadir)/pixmaps/@PACKAGE@\"" -DPLUGINS_DIR="\"$(prefix)/lib/@PACKAGE@\"" -DLOGO_PATH="\"$(datadir)/pixmaps/@PACKAGE@/grisbi-logo.png\"" -DDATA_PATH="\"$(datadir)/@PACKAGE@\"" -DHELP_PATH="\"$(datadir)/doc/@PACKAGE@\"" -Wall
bin_PROGRAMS = grisbi
# TODO: This manual setting of -Wl is a hack, I cannot get it from
# configure right now because of no doc.
-grisbi_LDFLAGS = @lt_prog_compiler_wl@@export_dynamic_flag_spec@ -lcunit
+grisbi_LDFLAGS = @lt_prog_compiler_wl@@export_dynamic_flag_spec@
config_dir = config
@@ -97,7 +97,6 @@
gsb_payment_method_config.c \
gsb_plugins.c \
gsb_real.c \
- gsb_real_cunit.c \
gsb_reconcile.c \
gsb_reconcile_config.c \
gsb_reconcile_list.c \
@@ -115,6 +114,7 @@
import_csv.c \
imputation_budgetaire.c \
main.c \
+ main_cunit.c \
menu.c \
meta_budgetary.c \
meta_categories.c \
@@ -138,7 +138,6 @@
utils.c \
utils_buttons.c \
utils_dates.c \
- utils_dates_cunit.c \
utils_editables.c \
utils_file_selection.c \
utils_files.c \
@@ -147,8 +146,6 @@
utils_str.c \
balance_estimate_tab.c
-grisbi_SOURCES = $(sources) $(sources_config)
-
grisbi_INCLUDES = \
$(include_config) \
accueil.h \
@@ -228,7 +225,6 @@
gsb_payment_method_config.h \
gsb_plugins.h \
gsb_real.h \
- gsb_real_cunit.h \
gsb_reconcile.h \
gsb_reconcile_config.h \
gsb_reconcile_list.h \
@@ -259,6 +255,7 @@
imputation_budgetaire.h \
include.h \
main.h \
+ main_cunit.h \
menu.h \
meta_budgetary.h \
meta_categories.h \
@@ -284,7 +281,6 @@
utils.h \
utils_buttons.h \
utils_dates.h \
- utils_dates_cunit.h \
utils_editables.h \
utils_file_selection.h \
utils_files.h \
@@ -292,8 +288,21 @@
utils_operations.h \
utils_str.h
+cunit_sources = \
+ gsb_real_cunit.c \
+ utils_dates_cunit.c
-EXTRA_DIST = grisbi.desktop grisbi.keys grisbi.mime $(grisbi_INCLUDES)
+cunit_includes = \
+ gsb_real_cunit.h \
+ utils_dates_cunit.h
+
+if HAVE_CUNIT
+grisbi_SOURCES = $(sources) $(sources_config) $(cunit_sources)
+else#HAVE_CUNIT
+grisbi_SOURCES = $(sources) $(sources_config)
+endif#HAVE_CUNIT
+
+EXTRA_DIST = grisbi.desktop grisbi.keys grisbi.mime $(grisbi_INCLUDES) $(cunit_sources) $(cunit_includes)
mimedir = $(datadir)/mime-info
mime_DATA = grisbi.keys grisbi.mime
Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- main.c 21 May 2009 21:58:55 -0000 1.145
+++ main.c 22 May 2009 18:43:32 -0000 1.146
@@ -45,22 +45,20 @@
#include "./gsb_file_config.h"
#include "./gsb_status.h"
#include "./gsb_plugins.h"
-#include "./gsb_real_cunit.h"
#include "./traitement_variables.h"
#include "./erreur.h"
#include "./parse_cmdline.h"
#include "./import.h"
-#include "./utils_dates_cunit.h"
#include "./parse_cmdline.h"
#include "./gsb_file_config.h"
#include "./include.h"
#include "./erreur.h"
#include "./structures.h"
+#include "./main_cunit.h"
/*END_INCLUDE*/
/*START_STATIC*/
-static int gsb_cunit_run_tests();
static gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
GdkEventWindowState *event,
gpointer null );
@@ -84,41 +82,6 @@
extern gchar *nom_fichier_comptes;
/*END_EXTERN*/
-#if HAVE_CUNIT
-
-#include <CUnit/Automated.h>
-#include <CUnit/Basic.h>
-
-#include "gsb_real_cunit.h"
-#include "utils_dates_cunit.h"
-
-int gsb_cunit_run_tests()
-{
- /* initialize the CUnit test registry */
- if (CUE_SUCCESS != CU_initialize_registry())
- return CU_get_error();
-
- /* add a suite to the registry */
- if ( ( NULL == gsb_real_cunit_create_suite ( ) )
- || ( NULL == utils_dates_cunit_create_suite ( ) )
- )
- {
- CU_cleanup_registry();
- return CU_get_error();
- }
-
- /* Run all tests */
-#ifdef _WIN32
- CU_automated_run_tests();
-#else//_WIN32
- CU_basic_run_tests();
-#endif//_WIN32
- CU_cleanup_registry();
- return CU_get_error();
-}
-#endif//HAVE_CUNIT
-
-
/**
* Main function
@@ -130,9 +93,7 @@
*/
int main (int argc, char **argv)
{
-#if HAVE_CUNIT
gsb_cunit_run_tests();
-#endif//HAVE_CUNIT
GtkWidget * statusbar;
gboolean first_use = FALSE;
--- NEW FILE: main_cunit.h ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: main_cunit.c ---
(This appears to be a binary file; contents omitted.)
- Previous message: [grisbi-cvs] grisbi configure.in,1.78,1.79
- Next message: [grisbi-cvs] grisbi/src gsb_data_account_cunit.c, NONE, 1.1 gsb_data_account_cunit.h, NONE, 1.1 gsb_data_account.c, 1.76, 1.77 gsb_data_account.h, 1.35, 1.36 main_cunit.c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list