Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not require doxygen in maintainer mode
[simgrid.git] / tools / tesh / tesh.h
1 /* $Id$ */
2
3 /* TESH (Test Shell) -- mini shell specialized in running test units        */
4
5 /* Copyright (c) 2007-2008, Da SimGrid team.                                */
6 /* All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef TESH_H
12 #define TESH_H
13
14 #include "portable.h"
15 #include "xbt/xbt_os_thread.h"
16 #include "xbt/strbuff.h"
17
18 /*** What we need to know about signals ***/
19 /******************************************/
20 /* return the name of a signal, aliasing SIGBUS to SIGSEGV since
21    segfault leads to any of them depending on the system */
22 const char* signal_name(unsigned int got, char *expected);
23
24 #include "run_context.h"
25
26 /*** Options ***/
27 int timeout_value; /* child timeout value */
28
29 rctx_t rctx;
30 char *testsuite_name;
31
32
33 /* Environment related definitions */
34 # ifdef __APPLE__
35 /* 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 */
36 # include <crt_externs.h>
37 # define environ (*_NSGetEnviron())
38 # else
39 /* the environment, as specified by the opengroup, used to initialize the process properties */
40 extern char **environ;
41 # endif
42
43 xbt_dict_t env; /* the environment, stored as a dict (for variable substitution) */
44
45 #endif /* TESH_H */