diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-10 11:38:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-10 11:38:46 +0000 |
commit | 8efaae301b29ec7cbdb921ac5e6b30ae2c143568 (patch) | |
tree | 44b8417ebe93dac752f5611bfd5bede01b65c700 /src/include | |
parent | 5d2bfbd4a69f87c99083fc60954c884af69258f4 (diff) | |
download | gnunet-8efaae301b29ec7cbdb921ac5e6b30ae2c143568.tar.gz gnunet-8efaae301b29ec7cbdb921ac5e6b30ae2c143568.zip |
-adding helper function to determine plugin names to testing
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_testing_lib-new.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/include/gnunet_testing_lib-new.h b/src/include/gnunet_testing_lib-new.h index b88cd9e98..9bd6c3b25 100644 --- a/src/include/gnunet_testing_lib-new.h +++ b/src/include/gnunet_testing_lib-new.h | |||
@@ -73,7 +73,6 @@ GNUNET_TESTING_system_create (const char *tmppath, | |||
73 | const char *controller); | 73 | const char *controller); |
74 | 74 | ||
75 | 75 | ||
76 | |||
77 | /** | 76 | /** |
78 | * Free system resources. | 77 | * Free system resources. |
79 | * | 78 | * |
@@ -225,6 +224,7 @@ typedef void (*GNUNET_TESTING_TestMain)(void *cls, | |||
225 | * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'. | 224 | * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'. |
226 | * | 225 | * |
227 | * @param tmppath path for storing temporary data for the test | 226 | * @param tmppath path for storing temporary data for the test |
227 | * also used to setup the program name for logging | ||
228 | * @param cfgfilename name of the configuration file to use; | 228 | * @param cfgfilename name of the configuration file to use; |
229 | * use NULL to only run with defaults | 229 | * use NULL to only run with defaults |
230 | * @param tm main function of the testcase | 230 | * @param tm main function of the testcase |
@@ -238,7 +238,6 @@ GNUNET_TESTING_peer_run (const char *tmppath, | |||
238 | void *tm_cls); | 238 | void *tm_cls); |
239 | 239 | ||
240 | 240 | ||
241 | |||
242 | /** | 241 | /** |
243 | * Start a single service (no ARM, except of course if the given | 242 | * Start a single service (no ARM, except of course if the given |
244 | * service name is 'arm') and run a test using the testing library. | 243 | * service name is 'arm') and run a test using the testing library. |
@@ -251,6 +250,7 @@ GNUNET_TESTING_peer_run (const char *tmppath, | |||
251 | * and if that service doesn't itself depend on other services. | 250 | * and if that service doesn't itself depend on other services. |
252 | * | 251 | * |
253 | * @param tmppath path for storing temporary data for the test | 252 | * @param tmppath path for storing temporary data for the test |
253 | * also used to setup the program name for logging | ||
254 | * @param service_name name of the service to run | 254 | * @param service_name name of the service to run |
255 | * @param cfgfilename name of the configuration file to use; | 255 | * @param cfgfilename name of the configuration file to use; |
256 | * use NULL to only run with defaults | 256 | * use NULL to only run with defaults |
@@ -267,6 +267,23 @@ GNUNET_TESTING_service_run (const char *tmppath, | |||
267 | 267 | ||
268 | 268 | ||
269 | 269 | ||
270 | /** | ||
271 | * Sometimes we use the binary name to determine which specific | ||
272 | * test to run. In those cases, the string after the last "_" | ||
273 | * in 'argv[0]' specifies a string that determines the configuration | ||
274 | * file or plugin to use. | ||
275 | * | ||
276 | * This function returns the respective substring, taking care | ||
277 | * of issues such as binaries ending in '.exe' on W32. | ||
278 | * | ||
279 | * @param argv0 the name of the binary | ||
280 | * @return string between the last '_' and the '.exe' (or the end of the string), | ||
281 | * NULL if argv0 has no '_' | ||
282 | */ | ||
283 | char * | ||
284 | GNUNET_TESTING_get_testname_from_underscore (const char *argv0); | ||
285 | |||
286 | |||
270 | #if 0 /* keep Emacsens' auto-indent happy */ | 287 | #if 0 /* keep Emacsens' auto-indent happy */ |
271 | { | 288 | { |
272 | #endif | 289 | #endif |