mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
Minor fixes to g_test: Adjust MODULEPATH so that the boundary path delimiters go at invocation; add DEFAULT_INCLUDES to the test_foo_CFLAGS; include the required NULL third arg to g_test_init()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20121 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f8a0864175
commit
56f1e28e36
@ -34,7 +34,7 @@ main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
g_type_init(); /* Initialize the GObject system */
|
||||
g_test_init ( &argc, &argv ); /* initialize test program */
|
||||
g_test_init ( &argc, &argv, NULL ); /* initialize test program */
|
||||
qof_log_init_filename_special("/dev/null"); /* Init the log system */
|
||||
|
||||
test_suite_qofbook();
|
||||
|
@ -6,7 +6,7 @@ include $(top_srcdir)/test-templates/Makefile.decl
|
||||
|
||||
#You will only need one of these: It points to the module directory
|
||||
#after $(top_srcdir) or ${top_builddir}:
|
||||
MODULEPATH = path/to/foo/
|
||||
MODULEPATH = path/to/foo
|
||||
|
||||
#The libtool convenience library to assemble the common test code
|
||||
#(fixture code, setup and teardown routines, mocks, etc.). Use it only
|
||||
@ -34,15 +34,16 @@ test_foo_SOURCES = \
|
||||
#etc.
|
||||
|
||||
test_foo_HEADERSS = \
|
||||
$(top_srcdir)${MODULEPATH}module1.h \
|
||||
$(top_srcdir)${MODULEPATH}module2.h \
|
||||
$(top_srcdir)/${MODULEPATH}/module1.h \
|
||||
$(top_srcdir)/${MODULEPATH}/module2.h \
|
||||
#etc.
|
||||
|
||||
|
||||
#The tests might require more libraries, but try to keep them
|
||||
#as independent as possible.
|
||||
test_foo_LDADD = ${top_buildir}${MODULEPATH}libgnc_foo.la
|
||||
test_foo_LDADD = ${top_buildir}/${MODULEPATH}/libgnc_foo.la
|
||||
|
||||
test_foo_CFLAGS = \
|
||||
-I$(top_srcdir)${MODULEPATH} \
|
||||
${DEFAULT_INCLUDES} \
|
||||
-I$(top_srcdir)/${MODULEPATH}/ \
|
||||
${GLIB_CFLAGS}
|
||||
|
@ -37,7 +37,7 @@ main (int argc,
|
||||
g_type_init(); /* You may or may not need this, depending on
|
||||
* whether the module you're testing or any
|
||||
* dependencies use GObject. */
|
||||
g_test_init ( &argc, &argv ); /* initialize test program */
|
||||
g_test_init ( &argc, &argv, NULL ); /* initialize test program */
|
||||
qof_log_init_filename_special("/dev/null"); /* Initialize the
|
||||
* gnucash logging system. Your tests will
|
||||
* crash on the first logging call otherwise */
|
||||
|
Loading…
Reference in New Issue
Block a user