Logo AND Algorithmique Numérique Distribuée

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