Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Evaluating the expression of xbt_assert must not have side effects.
[simgrid.git] / tools / tesh / tesh.h
1 /* TESH (Test Shell) -- mini shell specialized in running test units        */
2
3 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef TESH_H
10 #define TESH_H
11
12 #include "portable.h"
13 #include "xbt/xbt_os_thread.h"
14 #include "xbt/strbuff.h"
15
16 /*** What we need to know about signals ***/
17 /******************************************/
18 /* return the name of a signal, aliasing SIGBUS to SIGSEGV since
19    segfault leads to any of them depending on the system */
20 const char *signal_name(unsigned int got, char *expected);
21
22 #include "run_context.h"
23
24 /*** Options ***/
25 int timeout_value;              /* child timeout value */
26 int sort_len;                   /* length of the prefix to sort */
27 char* option;                                   /* cfg for command line */
28 #define SORT_LEN_DEFAULT 19
29
30 rctx_t rctx;
31 const char *testsuite_name;
32
33
34 /* Environment related definitions */
35 # ifdef __APPLE__
36 /* under darwin, the environment gets added to the process at startup time. So, it's not defined at library link time, forcing us to extra tricks */
37 # include <crt_externs.h>
38 # define environ (*_NSGetEnviron())
39 # else
40 /* the environment, as specified by the opengroup, used to initialize the process properties */
41 extern char **environ;
42 # endif
43
44 xbt_dict_t env;                 /* the environment, stored as a dict (for variable substitution) */
45
46 #endif                          /* TESH_H */