Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / tools / tesh / tesh.h
1 /* TESH (Test Shell) -- mini shell specialized in running test units        */
2
3 /* Copyright (c) 2007-2011, 2013-2014. 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 extern int timeout_value;       /* child timeout value */
26 extern int sort_len;            /* length of the prefix to sort */
27 extern char* option;            /* cfg for command line */
28 #define SORT_LEN_DEFAULT 19
29 extern int coverage;       /* coverage */
30
31 extern rctx_t rctx;
32 extern const char *testsuite_name;
33
34
35 /* Environment related definitions */
36 # ifdef __APPLE__
37 /* 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 */
38 # include <crt_externs.h>
39 # define environ (*_NSGetEnviron())
40 # else
41 /* the environment, as specified by the opengroup, used to initialize the process properties */
42 extern char **environ;
43 # endif
44
45 extern xbt_dict_t env; /* the environment, stored as a dict (for variable substitution) */
46
47 #endif                          /* TESH_H */