diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-11-30 14:02:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-11-30 14:02:25 +0000 |
commit | e14f682ca1de9f26c90420dd33ffad215bfef45c (patch) | |
tree | d50cc2c185108ff448667cae87a923ed0e26b23a /src/transport/test_transport_api.c | |
parent | 28824d44aba065b4a0afe6c9ee8526d7d8082611 (diff) | |
download | gnunet-e14f682ca1de9f26c90420dd33ffad215bfef45c.tar.gz gnunet-e14f682ca1de9f26c90420dd33ffad215bfef45c.zip |
added multi plugin transport api testcase
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r-- | src/transport/test_transport_api.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 488471e7a..1f9c56974 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -82,6 +82,8 @@ static int is_http; | |||
82 | 82 | ||
83 | static int is_https; | 83 | static int is_https; |
84 | 84 | ||
85 | static int is_multi_protocol; | ||
86 | |||
85 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 87 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
86 | 88 | ||
87 | static char * key_file_p1; | 89 | static char * key_file_p1; |
@@ -344,6 +346,12 @@ run (void *cls, | |||
344 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 346 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
345 | &end_badly, NULL); | 347 | &end_badly, NULL); |
346 | 348 | ||
349 | if (is_multi_protocol) | ||
350 | { | ||
351 | setup_peer (&p1, "test_transport_api_multi_peer1.conf"); | ||
352 | setup_peer (&p2, "test_transport_api_multi_peer2.conf"); | ||
353 | } | ||
354 | |||
347 | if (is_udp) | 355 | if (is_udp) |
348 | { | 356 | { |
349 | setup_peer (&p1, "test_transport_api_udp_peer1.conf"); | 357 | setup_peer (&p1, "test_transport_api_udp_peer1.conf"); |
@@ -559,10 +567,22 @@ main (int argc, char *argv[]) | |||
559 | { | 567 | { |
560 | is_http = GNUNET_YES; | 568 | is_http = GNUNET_YES; |
561 | } | 569 | } |
570 | else if (strstr(argv[0], "multi") != NULL) | ||
571 | { | ||
572 | is_multi_protocol = GNUNET_YES; | ||
573 | } | ||
562 | 574 | ||
563 | ret = check (); | 575 | ret = check (); |
564 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1"); | 576 | if (is_multi_protocol) |
565 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2"); | 577 | { |
578 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-1/"); | ||
579 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-2/"); | ||
580 | } | ||
581 | else | ||
582 | { | ||
583 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1"); | ||
584 | GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2"); | ||
585 | } | ||
566 | return ret; | 586 | return ret; |
567 | } | 587 | } |
568 | 588 | ||