2 * src/unit.c - type representing the tesh unit concept.
\r
4 * Copyright 2008,2009 Martin Quinson, Malek Cherier All right reserved.
\r
6 * This program is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the license (GNU LGPL) which comes with this package.
\r
10 * This file contains all the definitions of the functions related with
\r
11 * the tesh unit concept.
\r
16 #include <command.h>
\r
17 #include <context.h>
\r
18 #include <fstream.h>
\r
19 #include <variable.h>
\r
20 #include <str_replace.h>
\r
25 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(tesh);
\r
27 /*! \brief unit_start - start the processing of the tesh file representing by the unit
\r
29 * \param p A void pointer to the unit representing the tesh file to process.
\r
31 * \return This function (thread routine always returns NULL)
\r
35 * 1) The unit increment the number of running unit of the runner.
\r
36 * 2) The unit wait for the jobs semaphore to realy start its job.
\r
37 * 3) The unit runs the parsing of its tesh file using an fstream object.
\r
38 * 3.1) The fstream object parse the tesh file an launch each command with its context of execution.
\r
39 * 3.2) If a syntax error is detected the fstream object handle the failure and signals it by setting
\r
40 * the flag interrupted of the unit to one (depending of the keep-going and keep-going-unit flag values)
\r
41 * 3.3) If a command failed (exit code do not match, timeout, ouptupt different from the expected..)
\r
42 * the command handle the failure (see command_handle_failure() for more details).
\r
43 * 4) After the parsing of the tesh file.
\r
44 * 4.1) If all commands are successeded the last command release the unit by releasing its semaphore.
\r
45 * 4.2) If a command failed or if the tesh file is malformated the unit interrupt all the commands in progress.
\r
46 * 5) The unit wait for the end of all the threads associated with a command.
\r
47 * 6) Its release the next waiting unit (if any) by releasing the jobs semaphore.
\r
48 * 7) If its the last unit, it release the runner by releasing the semaphore used to wait for the end of all the units.
\r
52 unit_start(void* p)
\r
54 xbt_os_thread_t thread;
\r
55 xbt_os_mutex_t mutex;
\r
56 unit_t include, suite;
\r
57 unsigned int itc, itu, its;
\r
58 int include_nb, suite_nb;
\r
61 unit_t root = (unit_t)p;
\r
63 /* increment the number of running units */
\r
64 xbt_os_mutex_acquire(root->mutex);
\r
65 root->runner->number_of_runned_units++;
\r
66 xbt_os_mutex_release(root->mutex);
\r
68 /* must acquire the jobs semaphore to start */
\r
69 xbt_os_sem_acquire(jobs_sem);
\r
71 /* initialize the mutex used to synchronize the access to the properties of this unit */
\r
72 mutex = xbt_os_mutex_init();
\r
75 INFO1("checking unit %s...",root->fstream->name);
\r
77 /* launch the parsing of the unit */
\r
78 fstream_parse(root->fstream, mutex);
\r
80 /* if the unit is not interrupted and not failed the unit, all the file is parsed
\r
81 * so all the command are launched
\r
83 if(!root->interrupted)
\r
87 /* all the commands have terminated before the end of the parsing of the tesh file
\r
88 * so the unit release the semaphore itself
\r
90 if(!root->released && (root->started_cmd_nb == (root->failed_cmd_nb + root->interrupted_cmd_nb + root->successeded_cmd_nb)))
\r
91 xbt_os_sem_release(root->sem);
\r
94 /* wait the end of all the commands or a command failure or an interruption */
\r
95 xbt_os_sem_acquire(root->sem);
\r
97 if(root->interrupted)
\r
99 xbt_dynar_foreach(root->commands, itc , command)
\r
101 if(command->status == cs_in_progress)
\r
102 command_interrupt(command);
\r
105 /* interrupt all the running commands of the included units */
\r
106 include_nb = xbt_dynar_length(root->includes);
\r
108 xbt_dynar_foreach(root->includes, itu, include)
\r
110 xbt_dynar_foreach(include->commands, itc, command)
\r
112 if(command->status == cs_in_progress)
\r
113 command_interrupt(command);
\r
117 /* interrupt all the running commands of the unit */
\r
118 suite_nb = xbt_dynar_length(root->suites);
\r
120 xbt_dynar_foreach(root->suites, its, suite)
\r
122 include_nb = xbt_dynar_length(suite->includes);
\r
124 xbt_dynar_foreach(suite->includes, itu, include)
\r
126 xbt_dynar_foreach(include->commands, itc, command)
\r
128 if(command->status == cs_in_progress)
\r
129 command_interrupt(command);
\r
135 /* wait the end of the command threads of the unit */
\r
136 xbt_dynar_foreach(root->commands, itc, command)
\r
138 thread = command->thread;
\r
141 xbt_os_thread_join(thread,NULL);
\r
144 /* wait the end of the command threads of the included units of the unit */
\r
145 include_nb = xbt_dynar_length(root->includes);
\r
147 xbt_dynar_foreach(root->includes, itu, include)
\r
149 xbt_dynar_foreach(include->commands, itc, command)
\r
151 thread = command->thread;
\r
154 xbt_os_thread_join(thread,NULL);
\r
158 /* interrupt all the running commands of the unit */
\r
159 suite_nb = xbt_dynar_length(root->suites);
\r
161 xbt_dynar_foreach(root->suites, its, suite)
\r
163 include_nb = xbt_dynar_length(suite->includes);
\r
165 xbt_dynar_foreach(suite->includes, itu, include)
\r
167 xbt_dynar_foreach(include->commands, itc, command)
\r
169 thread = command->thread;
\r
172 xbt_os_thread_join(thread,NULL);
\r
177 /* you can now destroy the mutex used to synchrone the command accesses to the properties of the unit */
\r
178 xbt_os_mutex_destroy(mutex);
\r
180 /* update the number of ended units of the runner */
\r
181 xbt_os_mutex_acquire(root->mutex);
\r
183 /* increment the number of ended units */
\r
184 root->runner->number_of_ended_units++;
\r
186 /* if itc's the last unit, release the runner */
\r
187 if((root->runner->number_of_runned_units == root->runner->number_of_ended_units))
\r
189 /* if all the commands of the unit are successeded itc's a successeded unit */
\r
190 if(root->successeded_cmd_nb == root->cmd_nb)
\r
191 root->successeded = 1;
\r
193 /* first release the mutex */
\r
194 xbt_os_mutex_release(root->mutex);
\r
196 /* release the runner */
\r
197 xbt_os_sem_release(units_sem);
\r
200 xbt_os_mutex_release(root->mutex);
\r
202 /* release the jobs semaphore, then the next waiting unit can start */
\r
203 xbt_os_sem_release(jobs_sem);
\r
211 unit_new(runner_t runner, unit_t root, unit_t owner, fstream_t fstream)
\r
215 /* TODO : check the parameters */
\r
217 unit = xbt_new0(s_unit_t, 1);
\r
219 /* instantiate the vector used to store all the commands of the unit */
\r
220 unit->commands = xbt_dynar_new(sizeof(command_t), (void_f_pvoid_t)command_free);
\r
222 /* instantiate the vector used to store all the included units */
\r
223 unit->includes = xbt_dynar_new(sizeof(unit_t), (void_f_pvoid_t)unit_free);
\r
225 /* instantiate the vector used to store all the included suites */
\r
226 unit->suites = xbt_dynar_new(sizeof(unit_t), (void_f_pvoid_t)unit_free);
\r
228 /* the runner used to launch the tesh unit */
\r
229 unit->runner = runner;
\r
231 /* the file stream object to use to parse the tesh file */
\r
232 unit->fstream = fstream;
\r
235 fstream->unit = unit;
\r
237 /* if no root parameter specified assume that itc's the root of all the units */
\r
238 unit->root = root ? root : unit;
\r
240 /* the owner of the suite */
\r
241 unit->owner = owner;
\r
243 unit->thread = NULL;
\r
244 unit->started_cmd_nb = 0;
\r
245 unit->interrupted_cmd_nb = 0;
\r
246 unit->failed_cmd_nb = 0;
\r
247 unit->successeded_cmd_nb = 0;
\r
248 unit->terminated_cmd_nb = 0;
\r
249 unit->waiting_cmd_nb = 0;
\r
250 unit->interrupted = 0;
\r
252 unit->successeded = 0;
\r
254 unit->released = 0;
\r
255 unit->owner = owner;
\r
256 unit->is_running_suite = 0;
\r
257 unit->description = NULL;
\r
265 unit_free(unit_t* ptr)
\r
268 /* check the parameter */
\r
275 xbt_dynar_free(&((*ptr)->commands));
\r
277 xbt_dynar_free(&((*ptr)->includes));
\r
279 xbt_dynar_free(&((*ptr)->suites));
\r
281 /* if the unit is interrupted during its run, the semaphore is NULL */
\r
283 xbt_os_sem_destroy((*ptr)->sem);
\r
285 if((*ptr)->description)
\r
286 free((*ptr)->description);
\r
295 unit_run(unit_t unit, xbt_os_mutex_t mutex)
\r
297 /* check the parameters */
\r
298 if(!(unit) || !mutex)
\r
306 unit->mutex = mutex;
\r
308 unit->sem = xbt_os_sem_init(0);
\r
310 /* start the unit */
\r
311 unit->thread = xbt_os_thread_create("", unit_start, unit);
\r
314 /* the unit is interrupted by the runner before its starting
\r
315 * in this case the unit semaphore is NULL take care of that
\r
316 * in the function unit_free()
\r
318 unit->interrupted = 1;
\r
325 unit_interrupt(unit_t unit)
\r
327 /* check the parameter */
\r
334 /* if the unit is already interrupted, signal the error */
\r
335 if(unit->interrupted)
\r
341 /* interrupt the run of the specified unit */
\r
342 unit->interrupted = 1;
\r
343 xbt_os_sem_release(unit->sem);
\r
348 /* just print the title of the root unit or a suite (if any) */
\r
350 print_title(const char* description)
\r
354 size_t len = strlen(description);
\r
358 for (i = 1; i < 79; i++)
\r
364 sprintf(title + 40 - (len + 4)/2, "[ %s ]",description);
\r
365 title[40 + (len + 5 ) / 2] = '=';
\r
367 printf("\n%s\n",title);
\r
371 unit_summuarize(unit_t unit)
\r
374 unsigned int itc, itu, its;
\r
378 char title[PATH_MAX + 1] = {0};
\r
380 int number_of_tests = 0; /* number of tests of a unit contained by this unit */
\r
381 int number_of_failed_tests = 0; /* number of failed test of a unit contained by this unit */
\r
382 int number_of_successeded_tests = 0; /* number of successeded tests of a unit contained by this unit */
\r
383 int number_of_interrupted_tests = 0; /* number of interrupted tests of a unit contained by this unit */
\r
385 int number_of_tests_of_suite = 0; /* number of tests of a suite contained by this unit */
\r
386 int number_of_interrupted_tests_of_suite = 0; /* number of interrupted tests of a suite contained by this unit */
\r
387 int number_of_failed_tests_of_suite = 0; /* number of failed tests of a suite contained by this unit */
\r
388 int number_of_successeded_tests_of_suite = 0; /* number of successeded tests of a suite contained by this */
\r
390 int number_of_units = 0; /* number of units contained by a suite */
\r
391 int number_of_failed_units = 0; /* number of failed units contained by a suite */
\r
392 int number_of_successeded_units = 0; /* number of successeded units contained by a suite */
\r
393 int number_of_interrupted_units = 0; /* number of interrupted units contained by a suite */
\r
395 int total_of_tests = 0; /* total of the tests contained by this unit */
\r
396 int total_of_failed_tests = 0; /* total of failed tests contained by this unit */
\r
397 int total_of_successeded_tests = 0; /* total of successeded tests contained by this unit */
\r
398 int total_of_interrupted_tests = 0; /* total of interrupted tests contained by this unit */
\r
400 int total_of_units = 0; /* total of units contained by this unit */
\r
401 int total_of_failed_units = 0; /* total of failed units contained by this unit */
\r
402 int total_of_successeded_units = 0; /* total of successeded units contained by this unit */
\r
403 int total_of_interrupted_units = 0; /* total of interrutped units contained by this unit */
\r
405 int total_of_suites = 0; /* total of suites contained by this unit */
\r
406 int total_of_failed_suites = 0; /* total of failed suites contained by this unit */
\r
407 int total_of_successeded_suites = 0; /* total of successeded suites contained by this unit */
\r
408 int total_of_interrupted_suites = 0; /* total of interrupted suites contained by this unit */
\r
411 /* check the parameter */
\r
418 if(unit->description)
\r
419 strcpy(title, unit->description);
\r
421 sprintf(title, "file : %s",unit->fstream->name);
\r
423 if(unit->interrupted)
\r
424 strcat(title, " (interrupted)");
\r
426 print_title(title);
\r
428 number_of_tests = xbt_dynar_length(unit->commands);
\r
431 xbt_dynar_foreach(unit->commands, itc, command)
\r
433 if(command->status == cs_interrupted)
\r
434 number_of_interrupted_tests++;
\r
435 else if(command->status == cs_failed)
\r
436 number_of_failed_tests++;
\r
437 else if(command->status == cs_successeded)
\r
438 number_of_successeded_tests++;
\r
442 if(number_of_tests)
\r
444 asprintf(&p," Test(s): .........................................................................");
\r
450 if(number_of_failed_tests > 0)
\r
451 printf(".. failed\n");
\r
452 else if(number_of_interrupted_tests > 0)
\r
453 printf("interrupt\n");
\r
455 printf(".... ..ok\n");
\r
457 xbt_dynar_foreach(unit->commands, itc, command)
\r
459 printf(" %s: %s [%s]\n",
\r
460 command->status == cs_interrupted ? "INTR "
\r
461 : command->status == cs_failed ? "FAILED"
\r
462 : command->status == cs_successeded ? "PASS "
\r
464 command->context->command_line,
\r
465 command->context->line);
\r
467 if(detail_summary_flag)
\r
468 command_summarize(command);
\r
471 printf(" =====================================================================%s\n",
\r
472 number_of_failed_tests ? "== FAILED": number_of_interrupted_tests ? "==== INTR" : "====== OK");
\r
474 printf(" Summary: Test(s): %.0f%% ok (%d test(s): %d ok",
\r
475 ((1-((double)number_of_failed_tests + (double)number_of_interrupted_tests)/(double)number_of_tests)*100.0),
\r
476 number_of_tests, number_of_successeded_tests);
\r
478 if(number_of_failed_tests > 0)
\r
479 printf(", %d failed", number_of_failed_tests);
\r
481 if(number_of_interrupted_tests > 0)
\r
482 printf(", %d interrupted)", number_of_interrupted_tests);
\r
486 total_of_tests = number_of_tests;
\r
487 total_of_failed_tests = number_of_failed_tests;
\r
488 total_of_interrupted_tests = number_of_interrupted_tests;
\r
489 total_of_successeded_tests = number_of_successeded_tests;
\r
495 total_of_failed_units = total_of_interrupted_units = total_of_successeded_units = 0;
\r
496 number_of_failed_units = number_of_successeded_units = number_of_interrupted_units = 0;
\r
497 number_of_units = xbt_dynar_length(unit->includes);
\r
499 xbt_dynar_foreach(unit->includes, itu, include)
\r
502 number_of_interrupted_tests = number_of_failed_tests = number_of_successeded_tests = 0;
\r
504 number_of_tests = xbt_dynar_length(include->commands);
\r
506 xbt_dynar_foreach(include->commands, itc, command)
\r
508 if(command->status == cs_interrupted)
\r
509 number_of_interrupted_tests++;
\r
510 else if(command->status == cs_failed)
\r
511 number_of_failed_tests++;
\r
512 else if(command->status == cs_successeded)
\r
513 number_of_successeded_tests++;
\r
516 asprintf(&p," Unit: %s ............................................................................", include->description ? include->description : include->fstream->name);
\r
522 if(number_of_failed_tests > 0)
\r
524 total_of_failed_units++;
\r
525 printf(".. failed\n");
\r
527 else if(number_of_interrupted_tests > 0)
\r
529 total_of_interrupted_units++;
\r
530 printf("interrupt\n");
\r
534 total_of_successeded_units++;
\r
535 printf(".... ..ok\n");
\r
538 if(detail_summary_flag)
\r
541 xbt_dynar_foreach(include->commands, itc, command)
\r
543 printf(" %s: %s [%s]\n",
\r
544 command->status == cs_interrupted ? "INTR "
\r
545 : command->status == cs_failed ? "FAILED"
\r
546 : command->status == cs_successeded ? "PASS "
\r
548 command->context->command_line,
\r
549 command->context->line);
\r
551 command_summarize(command);
\r
557 printf(" =====================================================================%s\n",
\r
558 number_of_failed_tests ? "== FAILED": number_of_interrupted_tests ? "==== INTR" : "====== OK");
\r
561 printf(" Summary: Test(s): %.0f%% ok (%d test(s): %d ok",
\r
562 (number_of_tests ? (1-((double)number_of_failed_tests + (double)number_of_interrupted_tests)/(double)number_of_tests)*100.0 : 100.0),
\r
563 number_of_tests, number_of_successeded_tests);
\r
565 if(number_of_failed_tests > 0)
\r
566 printf(", %d failed", number_of_failed_tests);
\r
568 if(number_of_interrupted_tests > 0)
\r
569 printf(", %d interrupted)", number_of_interrupted_tests);
\r
574 total_of_tests += number_of_tests;
\r
575 total_of_failed_tests += number_of_failed_tests;
\r
576 total_of_interrupted_tests += number_of_interrupted_tests;
\r
577 total_of_successeded_tests += number_of_successeded_tests;
\r
581 total_of_units = number_of_units;
\r
583 total_of_failed_suites = total_of_successeded_suites = total_of_interrupted_suites = 0;
\r
585 total_of_suites = xbt_dynar_length(unit->suites);
\r
587 xbt_dynar_foreach(unit->suites, its, suite)
\r
589 print_title(suite->description);
\r
591 number_of_tests_of_suite = number_of_interrupted_tests_of_suite = number_of_failed_tests_of_suite = number_of_successeded_tests_of_suite = 0;
\r
593 number_of_interrupted_units = number_of_failed_units = number_of_successeded_units = 0;
\r
595 number_of_units = xbt_dynar_length(suite->includes);
\r
597 xbt_dynar_foreach(suite->includes, itu, include)
\r
599 number_of_interrupted_tests = number_of_failed_tests = number_of_successeded_tests = 0;
\r
601 number_of_tests = xbt_dynar_length(include->commands);
\r
604 xbt_dynar_foreach(include->commands, itc, command)
\r
606 if(command->status == cs_interrupted)
\r
607 number_of_interrupted_tests++;
\r
608 else if(command->status == cs_failed)
\r
609 number_of_failed_tests++;
\r
610 else if(command->status == cs_successeded)
\r
611 number_of_successeded_tests++;
\r
614 asprintf(&p," Unit: %s ............................................................................", include->description ? include->description : include->fstream->name);
\r
620 if(number_of_failed_tests > 0)
\r
622 number_of_failed_units++;
\r
623 printf(".. failed\n");
\r
625 else if(number_of_interrupted_tests > 0)
\r
627 number_of_interrupted_units++;
\r
628 printf("interrupt\n");
\r
632 number_of_successeded_units++;
\r
633 printf(".... ..ok\n");
\r
636 number_of_interrupted_tests_of_suite += number_of_interrupted_tests;
\r
637 number_of_failed_tests_of_suite += number_of_failed_tests;
\r
638 number_of_successeded_tests_of_suite += number_of_successeded_tests;
\r
640 number_of_tests_of_suite += number_of_tests;
\r
642 total_of_tests += number_of_tests;
\r
643 total_of_failed_tests += number_of_failed_tests;
\r
644 total_of_interrupted_tests += number_of_interrupted_tests;
\r
645 total_of_successeded_tests += number_of_successeded_tests;
\r
647 if(detail_summary_flag)
\r
650 xbt_dynar_foreach(include->commands, itc, command)
\r
652 printf(" %s: %s [%s]\n",
\r
653 command->status == cs_interrupted ? "INTR "
\r
654 : command->status == cs_failed ? "FAILED"
\r
655 : command->status == cs_successeded ? "PASS "
\r
657 command->context->command_line,
\r
658 command->context->line);
\r
660 command_summarize(command);
\r
668 printf(" =====================================================================%s\n",
\r
669 number_of_failed_tests_of_suite ? "== FAILED": number_of_interrupted_tests_of_suite ? "==== INTR" : "====== OK");
\r
671 if(number_of_failed_tests_of_suite > 0)
\r
672 total_of_failed_suites++;
\r
673 else if(number_of_interrupted_tests_of_suite)
\r
674 total_of_interrupted_suites++;
\r
676 total_of_successeded_suites++;
\r
678 total_of_failed_units += number_of_failed_units;
\r
679 total_of_interrupted_units += number_of_interrupted_units;
\r
680 total_of_successeded_units += number_of_successeded_units;
\r
682 total_of_units += number_of_units;
\r
684 printf(" Summary: Unit(s): %.0f%% ok (%d unit(s): %d ok",
\r
685 (number_of_units ? (1-((double)number_of_failed_units + (double)number_of_interrupted_units)/(double)number_of_units)*100.0 : 100.0),
\r
686 number_of_units, number_of_successeded_units);
\r
688 if(number_of_failed_units > 0)
\r
689 printf(", %d failed", number_of_failed_units);
\r
691 if(number_of_interrupted_units > 0)
\r
692 printf(", %d interrupted)", number_of_interrupted_units);
\r
696 printf(" Test(s): %.0f%% ok (%d test(s): %d ok",
\r
697 (number_of_tests_of_suite ? (1-((double)number_of_failed_tests_of_suite + (double)number_of_interrupted_tests_of_suite)/(double)number_of_tests_of_suite)*100.0 : 100.0),
\r
698 number_of_tests_of_suite, number_of_successeded_tests_of_suite);
\r
700 if(number_of_failed_tests_of_suite > 0)
\r
701 printf(", %d failed", number_of_failed_tests_of_suite);
\r
703 if(number_of_interrupted_tests_of_suite > 0)
\r
704 printf(", %d interrupted)", number_of_interrupted_tests_of_suite);
\r
709 printf(" TOTAL : Suite(s): %.0f%% ok (%d suite(s): %d ok",
\r
710 (total_of_suites ? (1-((double)total_of_failed_suites + (double)total_of_interrupted_suites)/(double)total_of_suites)*100.0 : 100.0),
\r
711 total_of_suites, total_of_successeded_suites);
\r
713 if(total_of_failed_suites > 0)
\r
714 printf(", %d failed", total_of_failed_suites);
\r
716 if(total_of_interrupted_suites > 0)
\r
717 printf(", %d interrupted)", total_of_interrupted_suites);
\r
721 printf(" Unit(s): %.0f%% ok (%d unit(s): %d ok",
\r
722 (total_of_units ? (1-((double)total_of_failed_units + (double)total_of_interrupted_units)/(double)total_of_units)*100.0 : 100.0),
\r
723 total_of_units, total_of_successeded_units);
\r
725 if(total_of_failed_units > 0)
\r
726 printf(", %d failed", total_of_failed_units);
\r
728 if(total_of_interrupted_units > 0)
\r
729 printf(", %d interrupted)", total_of_interrupted_units);
\r
733 printf(" Test(s): %.0f%% ok (%d test(s): %d ok",
\r
734 (total_of_tests ? (1-((double)total_of_failed_tests + (double)total_of_interrupted_tests)/(double)total_of_tests)*100.0 : 100.0),
\r
735 total_of_tests, total_of_successeded_tests);
\r
737 if(total_of_failed_tests > 0)
\r
738 printf(", %d failed", total_of_failed_tests);
\r
740 if(total_of_interrupted_tests > 0)
\r
741 printf(", %d interrupted)", total_of_interrupted_tests);
\r
745 if(unit->interrupted)
\r
746 unit->runner->total_of_interrupted_units++;
\r
747 else if(total_of_failed_tests > 0)
\r
748 unit->runner->total_of_failed_units++;
\r
750 unit->runner->total_of_successeded_units++;
\r
752 unit->runner->total_of_tests += total_of_tests;
\r
753 unit->runner->total_of_failed_tests += total_of_failed_tests;
\r
754 unit->runner->total_of_successeded_tests += total_of_successeded_tests;
\r
755 unit->runner->total_of_interrupted_tests += total_of_interrupted_tests;
\r
757 unit->runner->total_of_units += total_of_units + 1;
\r
758 unit->runner->total_of_successeded_units += total_of_successeded_units;
\r
759 unit->runner->total_of_failed_units += total_of_failed_units;
\r
760 unit->runner->total_of_interrupted_units += total_of_interrupted_units;
\r
762 unit->runner->total_of_suites += total_of_suites;
\r
763 unit->runner->total_of_successeded_suites += total_of_successeded_suites;
\r
764 unit->runner->total_of_failed_suites += total_of_failed_suites;
\r
765 unit->runner->total_of_interrupted_suites += total_of_interrupted_suites;
\r
771 unit_reset(unit_t unit)
\r
773 fseek(unit->fstream->stream,0L, SEEK_SET);
\r