Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
some new files used to check Tesh
[simgrid.git] / tools / tesh2 / include / runner.h
1 /*\r
2  * include/runner.h - type representing the tesh runner .\r
3  *\r
4  * Copyright 2008,2009 Martin Quinson, Malek Cherier All right reserved. \r
5  *\r
6  * This program is free software; you can redistribute it and/or modify it \r
7  * under the terms of the license (GNU LGPL) which comes with this package.\r
8  *\r
9  * Purpose:\r
10  *              This file contains all the declarations of the functions related with\r
11  *              the tesh runner type.\r
12  *\r
13  */\r
14  \r
15 #ifndef __RUNNER_H      \r
16 #define __RUNNER_H\r
17 \r
18 #include <com.h>\r
19 \r
20 #ifdef __cplusplus\r
21 extern "C" {\r
22 #endif\r
23 \r
24 /*! \brief runner_init - initialize the tesh runner.\r
25  *\r
26  * \param check_syntax_flag             If 1, the runner check the syntax of all the tesh files before running.\r
27  * \param timeout                               The time alloted to the run of all the units (if -1 no time alloted).\r
28  * \param fstreams                              A fstreams object containing the file streams representing the tesh files to run.\r
29  *\r
30  * \return                                              If successful the function returns 0. Otherwise the function returns -1 and sets\r
31  *                                                              the global variable errno with the appropiate error code.\r
32  *\r
33  * errors :\r
34  *                                                              [EALREADY] if the runner is already initialized.\r
35  *                                                              [ENOMEM] if the system has not enough space to initialize the runner.\r
36  *                                                              [ESYNTAX] if the parameter check_syntax_flag is 1 and a syntax error is detected.\r
37  */                     \r
38 int\r
39 runner_init(/*int check_syntax_flag, */int timeout, fstreams_t fstreams);\r
40 \r
41 /*! \brief runner_run - run the tesh files.\r
42  */                     \r
43 void\r
44 runner_run(void);\r
45 \r
46 /*! \brief runner_destroy - destroy the runner (release all the resources allocated by the runner)\r
47  */\r
48 void\r
49 runner_destroy(void);\r
50 \r
51 /*! \brief runner_summarize - display the summary of the execution of all the tests of the tesh files.\r
52  */\r
53 void\r
54 runner_summarize(void);\r
55 \r
56 /*! \brief runner_interrupt - interrupt all the units of the run.\r
57  */\r
58 void\r
59 runner_interrupt(void);\r
60 \r
61 int\r
62 runner_is_timedout(void);\r
63 \r
64 \r
65 #ifdef __cplusplus\r
66 }\r
67 #endif\r
68 \r
69 \r
70 #endif /* !__RUNNER_H */\r