1 /*******************************/
2 /* GENERATED FILE, DO NOT EDIT */
3 /*******************************/
9 extern xbt_test_unit_t _xbt_current_unit;
11 /* SGU: BEGIN PROTOTYPES */
12 /* SGU: BEGIN FILE ./xbt/cunit.c */
13 void test_expected_failure(void);
16 /* SGU: END PROTOTYPES */
18 /*******************************/
19 /* GENERATED FILE, DO NOT EDIT */
20 /*******************************/
22 int main(int argc, char *argv[]) {
23 xbt_test_suite_t suite;
27 /* SGU: BEGIN SUITES DECLARATION */
28 /* SGU: BEGIN FILE ./xbt/cunit.c */
29 suite = xbt_test_suite_by_name("cunit","Testsuite mechanism autotest");
30 xbt_test_suite_push(suite, "expect", test_expected_failure, "expected failures");
33 /* SGU: END SUITES DECLARATION */
37 /* Search for the tests to do */
39 for (i=1;i<argc;i++) {
40 if (!strncmp(argv[i],"--tests=",strlen("--tests="))) {
41 char *p=strchr(argv[i],'=')+1;
42 if (selection[0] == '\0') {
45 strcat(selection, ",");
48 } else if (!strncmp(argv[i],"--dump-only",strlen("--dump-only"))||
49 !strncmp(argv[i],"--dump", strlen("--dump"))) {
50 xbt_test_dump(selection);
52 } else if (!strncmp(argv[i],"--help",strlen("--help"))) {
54 "Usage: testall [--help] [--tests=selection] [--dump-only]\n\n"
55 "--help: display this help\n"
56 "--dump-only: don't run the tests, but display some debuging info about the tests\n"
57 "--tests=selection: Use argument to select which suites/units/tests to run\n"
58 " --tests can be used more than once, and selection may be a comma\n"
59 " separated list of directives.\n\n"
60 "Directives are of the form:\n"
61 " [-]suitename[:unitname]\n\n"
62 "If the first char is a '-', the directive disables its argument instead of enabling it\n"
63 "suitename/unitname is the set of tests to en/disable. If a unitname is not specified,\n"
64 "it applies on any unit.\n\n"
65 "By default, everything is enabled.\n\n"
66 "'all' as suite name apply to all suites.\n\n"
67 "Example 1: \"-toto,+toto:tutu\"\n"
68 " disables the whole toto testsuite (any unit in it),\n"
69 " then reenables the tutu unit of the toto test suite.\n\n"
70 "Example 2: \"-all,+toto\"\n"
71 " Run nothing but the toto suite.\n");
74 printf("testall: Unknown option: %s\n",argv[i]);
78 /* Got all my tests to do */
80 return xbt_test_run(selection);
82 /*******************************/
83 /* GENERATED FILE, DO NOT EDIT */
84 /*******************************/