diff options
author | t3sserakt <t3ss@posteo.de> | 2021-11-09 17:38:47 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-11-09 17:43:25 +0100 |
commit | 8cd4dadfb9ebd4db232fda79d5c4353eacb15690 (patch) | |
tree | a063e52d71d1b6611371f6c129c6ae1b0215cf99 /src/include/gnunet_testing_ng_lib.h | |
parent | 6fb788ca2ec44837ea10a36be7fd0030fb08955b (diff) | |
download | gnunet-8cd4dadfb9ebd4db232fda79d5c4353eacb15690.tar.gz gnunet-8cd4dadfb9ebd4db232fda79d5c4353eacb15690.zip |
- moved global netjail methods to its own header file.dev/t3ss/tng
- added configuration by string in test skript instead of config file.
- moved netjail scripts to contrib/netjail and install them into
the share/gnunet directory.
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index 7ce73baef..2d040ac21 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -657,6 +657,16 @@ GNUNET_TESTING_get_topo_from_file (const char *filename); | |||
657 | 657 | ||
658 | 658 | ||
659 | /** | 659 | /** |
660 | * Parse the topology data. | ||
661 | * | ||
662 | * @param data The topology data. | ||
663 | * @return The GNUNET_TESTING_NetjailTopology | ||
664 | */ | ||
665 | struct GNUNET_TESTING_NetjailTopology * | ||
666 | GNUNET_TESTING_get_topo_from_string (char *data); | ||
667 | |||
668 | |||
669 | /** | ||
660 | * Get the connections to other nodes for a specific node. | 670 | * Get the connections to other nodes for a specific node. |
661 | * | 671 | * |
662 | * @param num The specific node we want the connections for. | 672 | * @param num The specific node we want the connections for. |
@@ -1073,28 +1083,6 @@ struct LocalPreparedState | |||
1073 | TESTING_CMD_HELPER_write_cb write_message; | 1083 | TESTING_CMD_HELPER_write_cb write_message; |
1074 | }; | 1084 | }; |
1075 | 1085 | ||
1076 | /** | ||
1077 | * Create command. | ||
1078 | * | ||
1079 | * @param label name for command. | ||
1080 | * @param now when the command was started. | ||
1081 | * @return command. | ||
1082 | */ | ||
1083 | struct GNUNET_TESTING_Command | ||
1084 | GNUNET_TESTING_cmd_hello_world_birth (const char *label, | ||
1085 | struct GNUNET_TIME_Absolute *now); | ||
1086 | |||
1087 | /** | ||
1088 | * Create command. | ||
1089 | * | ||
1090 | * @param label name for command. | ||
1091 | * @param message initial message. | ||
1092 | * @return command. | ||
1093 | */ | ||
1094 | struct GNUNET_TESTING_Command | ||
1095 | GNUNET_TESTING_cmd_hello_world (const char *label, | ||
1096 | const char *birthLabel, | ||
1097 | char *message); | ||
1098 | 1086 | ||
1099 | /** | 1087 | /** |
1100 | * Offer data from trait | 1088 | * Offer data from trait |
@@ -1135,20 +1123,25 @@ GNUNET_TESTING_cmd_system_destroy (const char *label, | |||
1135 | */ | 1123 | */ |
1136 | struct GNUNET_TESTING_Command | 1124 | struct GNUNET_TESTING_Command |
1137 | GNUNET_TESTING_cmd_netjail_start (const char *label, | 1125 | GNUNET_TESTING_cmd_netjail_start (const char *label, |
1138 | char *topology_config); | 1126 | char *topology_config, |
1127 | unsigned int *read_file); | ||
1139 | 1128 | ||
1140 | 1129 | ||
1141 | /** | 1130 | /** |
1142 | * Create command. | 1131 | * Create command. |
1143 | * | 1132 | * |
1144 | * @param label Name for the command. | 1133 | * @param label Name for the command. |
1145 | * @param topology_config Configuration file for the test topology. | 1134 | * @param topology The complete topology information. |
1146 | * @param rv Pointer to the return value of the test. | 1135 | * @param read_file Flag indicating if the the name of the topology file is send to the helper, or a string with the topology data. |
1136 | * @param topology_data If read_file is GNUNET_NO, topology_data holds the string with the topology. | ||
1147 | * @return command. | 1137 | * @return command. |
1148 | */ | 1138 | */ |
1149 | struct GNUNET_TESTING_Command | 1139 | struct GNUNET_TESTING_Command |
1150 | GNUNET_TESTING_cmd_netjail_start_testing_system (const char *label, | 1140 | GNUNET_TESTING_cmd_netjail_start_testing_system ( |
1151 | const char *topology_config); | 1141 | const char *label, |
1142 | struct GNUNET_TESTING_NetjailTopology *topology, | ||
1143 | unsigned int *read_file, | ||
1144 | char *topology_data); | ||
1152 | 1145 | ||
1153 | 1146 | ||
1154 | /** | 1147 | /** |
@@ -1160,20 +1153,23 @@ GNUNET_TESTING_cmd_netjail_start_testing_system (const char *label, | |||
1160 | */ | 1153 | */ |
1161 | struct GNUNET_TESTING_Command | 1154 | struct GNUNET_TESTING_Command |
1162 | GNUNET_TESTING_cmd_netjail_stop (const char *label, | 1155 | GNUNET_TESTING_cmd_netjail_stop (const char *label, |
1163 | char *topology_config); | 1156 | char *topology_config, |
1157 | unsigned int *read_file); | ||
1164 | 1158 | ||
1165 | 1159 | ||
1166 | /** | 1160 | /** |
1167 | * Create command. | 1161 | * Create command. |
1168 | * | 1162 | * |
1169 | * @param label name for command. | 1163 | * @param label name for command. |
1170 | * @param topology_config Configuration file for the test topology. | 1164 | * @param helper_start_label label of the cmd to start the test system. |
1165 | * @param topology The complete topology information. | ||
1171 | * @return command. | 1166 | * @return command. |
1172 | */ | 1167 | */ |
1173 | struct GNUNET_TESTING_Command | 1168 | struct GNUNET_TESTING_Command |
1174 | GNUNET_TESTING_cmd_stop_testing_system (const char *label, | 1169 | GNUNET_TESTING_cmd_stop_testing_system ( |
1175 | const char *helper_start_label, | 1170 | const char *label, |
1176 | const char *topology_config); | 1171 | const char *helper_start_label, |
1172 | struct GNUNET_TESTING_NetjailTopology *topology); | ||
1177 | 1173 | ||
1178 | 1174 | ||
1179 | /** | 1175 | /** |