mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Get test-lots to die consistently.
- Set the rng to a known seed. - Loop the test so it fails. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10159 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
454a48e325
commit
abc0dfff51
@ -46,11 +46,15 @@ run_test (void)
|
|||||||
* XXX not implemented
|
* XXX not implemented
|
||||||
*/
|
*/
|
||||||
success ("automatic lot scrubbing lightly tested and seem to work");
|
success ("automatic lot scrubbing lightly tested and seem to work");
|
||||||
|
qof_session_destroy (sess);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
main_helper (void *closure, int argc, char **argv)
|
main_helper (void *closure, int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
/* Any tests that cause an error or warning to be printed
|
/* Any tests that cause an error or warning to be printed
|
||||||
* automatically fail! */
|
* automatically fail! */
|
||||||
g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
|
g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
|
||||||
@ -59,7 +63,12 @@ main_helper (void *closure, int argc, char **argv)
|
|||||||
|
|
||||||
do_test((NULL!=gnc_module_load("gnucash/engine", 0)), "load engine");
|
do_test((NULL!=gnc_module_load("gnucash/engine", 0)), "load engine");
|
||||||
|
|
||||||
run_test ();
|
/* set the rng to a known starting point */
|
||||||
|
srand(0);
|
||||||
|
|
||||||
|
/* Iterate the test a number of times */
|
||||||
|
for (i=0; i< 20; i++)
|
||||||
|
run_test ();
|
||||||
|
|
||||||
print_test_results();
|
print_test_results();
|
||||||
exit(get_rv());
|
exit(get_rv());
|
||||||
|
Loading…
Reference in New Issue
Block a user