r21670 - gnucash/trunk/src - [Testing] Ensure that qof_log_init() has been called for all tests

John Ralls jralls at code.gnucash.org
Sun Dec 4 19:06:53 EST 2011


Author: jralls
Date: 2011-12-04 19:06:52 -0500 (Sun, 04 Dec 2011)
New Revision: 21670
Trac: http://svn.gnucash.org/trac/changeset/21670

Modified:
   gnucash/trunk/src/bin/gnucash-bin.c
   gnucash/trunk/src/engine/test/test-scm-query.c
   gnucash/trunk/src/gnc-module/gnc-module.c
   gnucash/trunk/src/import-export/test/test-import-parse.c
Log:
[Testing] Ensure that qof_log_init() has been called for all tests


Prevents error messages about g_hash being NULL.

Invokes qof_log_init_file_special ("stderr") in gnc_module_system_init(), so gnc_log_init() had to be moved to after that call in main() so that the command-line log setting doesn't get replaced with the default setting in module_system_init.

Note that gnc_module_load_common() has one of the offending "ENTER" macros that cause the error, and it's before the safety call of module_system_init, so test programs need to explicitly call module_system_init before loading any modules.



More information about the gnucash-patches mailing list