Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The second version of hierarchical routing. I implemented the parse functions and...
[simgrid.git] / src / simgrid_units_main.c
1 /*******************************/
2 /* GENERATED FILE, DO NOT EDIT */
3 /*******************************/
4
5 #include <stdio.h>
6
7 #include "xbt.h"
8
9 extern xbt_test_unit_t _xbt_current_unit;
10
11 /* SGU: BEGIN PROTOTYPES */
12   /* SGU: BEGIN FILE xbt/cunit.c */
13     void  test_expected_failure(void);
14   /* SGU: END FILE */
15
16   /* SGU: BEGIN FILE xbt/ex.c */
17     void  test_controlflow(void);
18     void  test_value(void);
19     void  test_variables(void);
20     void  test_cleanup(void);
21   /* SGU: END FILE */
22
23   /* SGU: BEGIN FILE xbt/dynar.c */
24     void  test_dynar_int(void);
25     void  test_dynar_double(void);
26     void  test_dynar_string(void);
27     void  test_dynar_sync_int(void);
28   /* SGU: END FILE */
29
30   /* SGU: BEGIN FILE xbt/dict.c */
31     void  test_dict_basic(void);
32     void  test_dict_remove(void);
33     void  test_dict_nulldata(void);
34     void  test_dict_scalar(void);
35     void  test_dict_crash(void);
36     void  test_dict_multicrash(void);
37   /* SGU: END FILE */
38
39   /* SGU: BEGIN FILE xbt/set.c */
40     void  test_set_basic(void);
41     void  test_set_change(void);
42     void  test_set_retrieve(void);
43     void  test_set_remove(void);
44   /* SGU: END FILE */
45
46   /* SGU: BEGIN FILE xbt/swag.c */
47     void  test_swag_basic(void);
48   /* SGU: END FILE */
49
50   /* SGU: BEGIN FILE xbt/xbt_str.c */
51     void  test_split_quoted(void);
52     void  test_split_str(void);
53   /* SGU: END FILE */
54
55   /* SGU: BEGIN FILE xbt/xbt_strbuff.c */
56     void  test_strbuff_substitute(void);
57   /* SGU: END FILE */
58
59   /* SGU: BEGIN FILE xbt/xbt_sha.c */
60     void  test_crypto_sha(void);
61   /* SGU: END FILE */
62
63   /* SGU: BEGIN FILE xbt/config.c */
64     void  test_config_memuse(void);
65     void  test_config_validation(void);
66     void  test_config_use(void);
67   /* SGU: END FILE */
68
69   /* SGU: BEGIN FILE xbt/xbt_synchro.c */
70     void  test_dynar_dopar(void);
71   /* SGU: END FILE */
72
73
74 /*******************************/
75 /* GENERATED FILE, DO NOT EDIT */
76 /*******************************/
77
78 int main(int argc, char *argv[]) {
79   xbt_test_suite_t suite; 
80   char selection[1024];
81   int i;
82
83   int res;
84
85   /* SGU: BEGIN SUITES DECLARATION */
86     /* SGU: BEGIN FILE xbt/cunit.c */
87       suite = xbt_test_suite_by_name("cunit","Testsuite mechanism autotest");
88       xbt_test_suite_push(suite, "expect",  test_expected_failure,  "expected failures");
89     /* SGU: END FILE */
90
91     /* SGU: BEGIN FILE xbt/ex.c */
92       suite = xbt_test_suite_by_name("xbt_ex","Exception Handling");
93       xbt_test_suite_push(suite, "controlflow",  test_controlflow,  "basic nested control flow");
94       xbt_test_suite_push(suite, "value",  test_value,  "exception value passing");
95       xbt_test_suite_push(suite, "variables",  test_variables,  "variable value preservation");
96       xbt_test_suite_push(suite, "cleanup",  test_cleanup,  "cleanup handling");
97     /* SGU: END FILE */
98
99     /* SGU: BEGIN FILE xbt/dynar.c */
100       suite = xbt_test_suite_by_name("dynar","Dynar data container");
101       xbt_test_suite_push(suite, "int",  test_dynar_int,  "Dynars of integers");
102       xbt_test_suite_push(suite, "double",  test_dynar_double,  "Dynars of doubles");
103       xbt_test_suite_push(suite, "string",  test_dynar_string,  "Dynars of strings");
104       xbt_test_suite_push(suite, "synchronized int",  test_dynar_sync_int, "Synchronized dynars of integers");
105     /* SGU: END FILE */
106
107     /* SGU: BEGIN FILE xbt/dict.c */
108       suite = xbt_test_suite_by_name("dict","Dict data container");
109       xbt_test_suite_push(suite, "basic",  test_dict_basic, "Basic usage: change, retrieve, traverse");
110       xbt_test_suite_push(suite, "remove",  test_dict_remove,  "Removing some values");
111       xbt_test_suite_push(suite, "nulldata",  test_dict_nulldata,  "NULL data management");
112       xbt_test_suite_push(suite, "dicti",  test_dict_scalar,  "Scalar data and key management");
113       xbt_test_suite_push(suite, "crash",  test_dict_crash,  "Crash test");
114       xbt_test_suite_push(suite, "multicrash",  test_dict_multicrash,  "Multi-dict crash test");
115     /* SGU: END FILE */
116
117     /* SGU: BEGIN FILE xbt/set.c */
118       suite = xbt_test_suite_by_name("set","Set data container");
119       xbt_test_suite_push(suite, "basic",  test_set_basic,  "Basic usage");
120       xbt_test_suite_push(suite, "change",  test_set_change,  "Changing some values");
121       xbt_test_suite_push(suite, "retrieve",  test_set_retrieve,  "Retrieving some values");
122       xbt_test_suite_push(suite, "remove",  test_set_remove,  "Removing some values");
123     /* SGU: END FILE */
124
125     /* SGU: BEGIN FILE xbt/swag.c */
126       suite = xbt_test_suite_by_name("swag","Swag data container");
127       xbt_test_suite_push(suite, "basic",  test_swag_basic,  "Basic usage");
128     /* SGU: END FILE */
129
130     /* SGU: BEGIN FILE xbt/xbt_str.c */
131       suite = xbt_test_suite_by_name("xbt_str","String Handling");
132       xbt_test_suite_push(suite, "xbt_str_split_quoted",  test_split_quoted, "test the function xbt_str_split_quoted");
133       xbt_test_suite_push(suite, "xbt_str_split_str",  test_split_str, "test the function xbt_str_split_str");
134     /* SGU: END FILE */
135
136     /* SGU: BEGIN FILE xbt/xbt_strbuff.c */
137       suite = xbt_test_suite_by_name("xbt_strbuff","String Buffers");
138       xbt_test_suite_push(suite, "xbt_strbuff_substitute",  test_strbuff_substitute, "test the function xbt_strbuff_substitute");
139     /* SGU: END FILE */
140
141     /* SGU: BEGIN FILE xbt/xbt_sha.c */
142       suite = xbt_test_suite_by_name("hash","Various hash functions");
143       xbt_test_suite_push(suite, "sha",  test_crypto_sha,  "Test of the sha algorithm");
144     /* SGU: END FILE */
145
146     /* SGU: BEGIN FILE xbt/config.c */
147       suite = xbt_test_suite_by_name("config","Configuration support");
148       xbt_test_suite_push(suite, "memuse",  test_config_memuse,  "Alloc and free a config set");
149       xbt_test_suite_push(suite, "validation",  test_config_validation,  "Validation tests");
150       xbt_test_suite_push(suite, "use",  test_config_use,  "Data retrieving tests");
151     /* SGU: END FILE */
152
153     /* SGU: BEGIN FILE xbt/xbt_synchro.c */
154       suite = xbt_test_suite_by_name("synchro","Advanced synchronization mecanisms");
155       xbt_test_suite_push(suite, "dopar",  test_dynar_dopar,  "do parallel on dynars of integers");
156     /* SGU: END FILE */
157
158   /* SGU: END SUITES DECLARATION */
159       
160   xbt_init(&argc,argv);
161     
162   /* Search for the tests to do */
163     selection[0]='\0';
164     for (i=1;i<argc;i++) {
165       if (!strncmp(argv[i],"--tests=",strlen("--tests="))) {
166         char *p=strchr(argv[i],'=')+1;
167         if (selection[0] == '\0') {
168           strcpy(selection, p);
169         } else {
170           strcat(selection, ",");
171           strcat(selection, p);
172         }
173       } else if (!strncmp(argv[i],"--dump-only",strlen("--dump-only"))||
174                  !strncmp(argv[i],"--dump",     strlen("--dump"))) {
175         xbt_test_dump(selection);
176         return 0;
177       } else if (!strncmp(argv[i],"--help",strlen("--help"))) {
178           printf(
179               "Usage: testall [--help] [--tests=selection] [--dump-only]\n\n"
180               "--help: display this help\n"
181               "--dump-only: don't run the tests, but display some debuging info about the tests\n"
182               "--tests=selection: Use argument to select which suites/units/tests to run\n"
183               "                   --tests can be used more than once, and selection may be a comma\n"
184               "                   separated list of directives.\n\n"
185               "Directives are of the form:\n"
186               "   [-]suitename[:unitname]\n\n"
187               "If the first char is a '-', the directive disables its argument instead of enabling it\n"
188               "suitename/unitname is the set of tests to en/disable. If a unitname is not specified,\n"
189               "it applies on any unit.\n\n"
190               "By default, everything is enabled.\n\n"
191               "'all' as suite name apply to all suites.\n\n"
192               "Example 1: \"-toto,+toto:tutu\"\n"
193               "  disables the whole toto testsuite (any unit in it),\n"
194               "  then reenables the tutu unit of the toto test suite.\n\n"
195               "Example 2: \"-all,+toto\"\n"
196               "  Run nothing but the toto suite.\n");
197           return 0;
198       } else {
199         printf("testall: Unknown option: %s\n",argv[i]);
200         return 1;
201       }
202     }
203   /* Got all my tests to do */
204       
205   res = xbt_test_run(selection);
206   xbt_test_exit();
207   return res;
208 }
209 /*******************************/
210 /* GENERATED FILE, DO NOT EDIT */
211 /*******************************/
212