]> git.meshlink.io Git - meshlink/blob - test/blackbox/common/common_types.h
Add the blackbox container based test suite.
[meshlink] / test / blackbox / common / common_types.h
1 /*
2     common_types.h -- Declarations of common types used in Black Box Testing
3     Copyright (C) 2018  Guus Sliepen <guus@meshlink.io>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef COMMON_TYPES_H
21 #define COMMON_TYPES_H
22
23 #include <stdbool.h>
24 #include "../../../src/meshlink.h"
25
26 #define NUT_NODE_NAME "nut"
27
28 #define LXC_UTIL_REL_PATH "test/blackbox/util"
29 #define LXC_RENAME_SCRIPT "lxc_rename.sh"
30 #define LXC_RUN_SCRIPT "lxc_run.sh"
31 #define LXC_COPY_SCRIPT "lxc_copy_file.sh"
32 #define LXC_BUILD_SCRIPT "build_container.sh"
33
34 typedef struct black_box_state {
35         char *test_case_name;
36         char **node_names;
37         int num_nodes;
38         bool test_result;
39 } black_box_state_t;
40
41 extern char *lxc_bridge;
42
43 extern char *eth_if_name;
44
45 extern black_box_state_t *state_ptr;
46
47 extern char *meshlink_root_path;
48
49 /* Meshlink Mesh Handle */
50 extern meshlink_handle_t *mesh_handle;
51
52 /* Flag to indicate if Mesh is running */
53 extern bool mesh_started;
54
55 #endif // COMMON_TYPES_H