X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/49db0fab32b65bf2224aa5d0334320e64a276787..2fe88613fbaaeb0e648d1d2acbd3f7b53f6a5298:/tools/tesh/tesh.h diff --git a/tools/tesh/tesh.h b/tools/tesh/tesh.h index 1b0c52ebfd..8f73c1c9a0 100644 --- a/tools/tesh/tesh.h +++ b/tools/tesh/tesh.h @@ -1,9 +1,7 @@ -/* $Id$ */ - /* TESH (Test Shell) -- mini shell specialized in running test units */ -/* Copyright (c) 2007 Martin Quinson. */ -/* All rights reserved. */ +/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -11,22 +9,35 @@ #ifndef TESH_H #define TESH_H -#include "xbt/xbt_thread.h" -/*** Buffers ***/ -/***************/ -#include "buff.h" +#include "portable.h" +#include "xbt/xbt_os_thread.h" +#include "xbt/strbuff.h" /*** What we need to know about signals ***/ /******************************************/ /* return the name of a signal, aliasing SIGBUS to SIGSEGV since segfault leads to any of them depending on the system */ -const char* signal_name(unsigned int got, char *expected); +const char *signal_name(unsigned int got, char *expected); #include "run_context.h" - + /*** Options ***/ -int timeout_value; /* child timeout value */ +int timeout_value; /* child timeout value */ rctx_t rctx; -char *testsuite_name; -#endif /* TESH_H */ +const char *testsuite_name; + + +/* Environment related definitions */ +# ifdef __APPLE__ +/* 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 */ +# include +# define environ (*_NSGetEnviron()) +# else +/* the environment, as specified by the opengroup, used to initialize the process properties */ +extern char **environ; +# endif + +xbt_dict_t env; /* the environment, stored as a dict (for variable substitution) */ + +#endif /* TESH_H */