[Gnucash-changes] Get test-lots to die consistently.
Derek Atkins
warlord at cvs.gnucash.org
Sun Jul 4 13:24:09 EDT 2004
Log Message:
-----------
Get test-lots to die consistently.
- Set the rng to a known seed.
- Loop the test so it fails.
Modified Files:
--------------
gnucash/src/engine/test:
test-lots.c
Revision Data
-------------
Index: test-lots.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-lots.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/test/test-lots.c -Lsrc/engine/test/test-lots.c -u -r1.6 -r1.7
--- src/engine/test/test-lots.c
+++ src/engine/test/test-lots.c
@@ -46,11 +46,15 @@
* XXX not implemented
*/
success ("automatic lot scrubbing lightly tested and seem to work");
+ qof_session_destroy (sess);
+
}
static void
main_helper (void *closure, int argc, char **argv)
{
+ int i;
+
/* Any tests that cause an error or warning to be printed
* automatically fail! */
g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
@@ -59,7 +63,12 @@
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();
exit(get_rv());
More information about the gnucash-changes
mailing list