diff options
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h deleted file mode 100644 index 407f50bb7..000000000 --- a/src/include/gnunet_testing_ng_lib.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2021, 2023 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @brief Meta-header for next-generation testing logic | ||
23 | * @author Christian Grothoff <christian@grothoff.org> | ||
24 | * @author Marcello Stanisci | ||
25 | * @author t3sserakt | ||
26 | */ | ||
27 | #ifndef GNUNET_TESTING_NG_LIB_H | ||
28 | #define GNUNET_TESTING_NG_LIB_H | ||
29 | |||
30 | |||
31 | #include "gnunet_util_lib.h" | ||
32 | |||
33 | /* FIXME: legacy test header, to be removed!! */ | ||
34 | #include "gnunet_testing_lib.h" | ||
35 | |||
36 | #include "gnunet_testing_plugin.h" | ||
37 | #include "gnunet_testing_loop_lib.h" | ||
38 | #include "gnunet_testing_netjail_lib.h" | ||
39 | |||
40 | |||
41 | /** | ||
42 | * Create a "signal" CMD. | ||
43 | * | ||
44 | * @param label command label. | ||
45 | * @param process_label label of a command that has a process trait | ||
46 | * @param signal signal to send to @a process. | ||
47 | * @return the command. | ||
48 | */ | ||
49 | struct GNUNET_TESTING_Command | ||
50 | GNUNET_TESTING_cmd_signal (const char *label, | ||
51 | const char *process_label, | ||
52 | int signal); | ||
53 | |||
54 | |||
55 | /** | ||
56 | * Sleep for @a duration. | ||
57 | * | ||
58 | * @param label command label. | ||
59 | * @param duration time to sleep | ||
60 | * @return the command. | ||
61 | */ | ||
62 | struct GNUNET_TESTING_Command | ||
63 | GNUNET_TESTING_cmd_sleep (const char *label, | ||
64 | struct GNUNET_TIME_Relative duration); | ||
65 | |||
66 | |||
67 | /** | ||
68 | * Command to execute a script synchronously. | ||
69 | * | ||
70 | * FIXME: is this accurate? How is this limited to BASH scripts or even scripts? | ||
71 | * | ||
72 | * @param label Label of the command. | ||
73 | * @param script The name of the script. | ||
74 | * @param script_argv The arguments of the script. | ||
75 | */ | ||
76 | const struct GNUNET_TESTING_Command | ||
77 | GNUNET_TESTING_cmd_exec_bash_script (const char *label, | ||
78 | const char *script, | ||
79 | char *const script_argv[], | ||
80 | // FIXME: wtf are these two args here for!? | ||
81 | int argc, | ||
82 | GNUNET_ChildCompletedCallback cb); | ||
83 | |||
84 | |||
85 | |||
86 | /* ****** Specific traits needed by this component ******* */ | ||
87 | |||
88 | |||
89 | /** | ||
90 | * Call #op on all simple traits. | ||
91 | */ | ||
92 | #define GNUNET_TESTING_SIMPLE_TRAITS(op, prefix) \ | ||
93 | op (prefix, process, struct GNUNET_OS_Process *) | ||
94 | |||
95 | |||
96 | GNUNET_TESTING_SIMPLE_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT, GNUNET_TESTING) | ||
97 | |||
98 | /** | ||
99 | * Call #op on all indexed traits. | ||
100 | */ | ||
101 | #define GNUNET_TESTING_INDEXED_TRAITS(op, prefix) \ | ||
102 | op (prefix, uint32, const uint32_t) \ | ||
103 | op (prefix, uint64, const uint64_t) \ | ||
104 | op (prefix, int64, const int64_t) \ | ||
105 | op (prefix, uint, const unsigned int) \ | ||
106 | op (prefix, string, const char) \ | ||
107 | op (prefix, uuid, const struct GNUNET_Uuid) \ | ||
108 | op (prefix, time, const struct GNUNET_TIME_Absolute) \ | ||
109 | op (prefix, absolute_time, const struct GNUNET_TIME_Absolute) \ | ||
110 | op (prefix, relative_time, const struct GNUNET_TIME_Relative) | ||
111 | |||
112 | GNUNET_TESTING_INDEXED_TRAITS (GNUNET_TESTING_MAKE_DECL_INDEXED_TRAIT, GNUNET_TESTING) | ||
113 | |||
114 | |||
115 | #endif | ||