aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-12-31 13:11:51 +0900
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-12-31 13:11:51 +0900
commit68c1810604ffbe7ffe95cdd54785baffc159d956 (patch)
treef94b2430af9f9164a87668ee83fe745d6554ada4
parenta91090c6625ba08b6b1ae040a48823bdb0e00609 (diff)
downloadgnunet-68c1810604ffbe7ffe95cdd54785baffc159d956.tar.gz
gnunet-68c1810604ffbe7ffe95cdd54785baffc159d956.zip
rename tests to dertermine test mode
-rw-r--r--src/transport/Makefile.am29
-rw-r--r--src/transport/test_communicator_basic.c13
2 files changed, 30 insertions, 12 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index e037f3001..7dbff2d44 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -596,9 +596,10 @@ check_PROGRAMS += \
596 test_transport_api_udp_nat \ 596 test_transport_api_udp_nat \
597 test_transport_api_reliability_udp \ 597 test_transport_api_reliability_udp \
598 test_quota_compliance_udp \ 598 test_quota_compliance_udp \
599 test_communicator_basic_unix \ 599 test_communicator_basic-unix \
600 test_communicator_basic_tcp \ 600 test_communicator_basic-tcp \
601 test_communicator_basic_udp 601 test_communicator_basic-udp \
602 test_communicator_rekey-tcp
602endif 603endif
603endif 604endif
604 605
@@ -804,6 +805,14 @@ test_communicator_basic_udp_LDADD = \
804 libgnunettransporttesting2.la \ 805 libgnunettransporttesting2.la \
805 $(top_builddir)/src/testing/libgnunettesting.la \ 806 $(top_builddir)/src/testing/libgnunettesting.la \
806 $(top_builddir)/src/util/libgnunetutil.la 807 $(top_builddir)/src/util/libgnunetutil.la
808
809test_communicator_rekey_tcp_SOURCES = \
810 test_communicator_basic.c
811test_communicator_rekey_tcp_LDADD = \
812 libgnunettransporttesting2.la \
813 $(top_builddir)/src/testing/libgnunettesting.la \
814 $(top_builddir)/src/util/libgnunetutil.la
815
807endif 816endif
808 817
809test_plugin_unix_SOURCES = \ 818test_plugin_unix_SOURCES = \
@@ -1503,9 +1512,11 @@ test_transport_api_slow_ats_peer2.conf \
1503 tcp_server_mst_legacy.c \ 1512 tcp_server_mst_legacy.c \
1504 tcp_server_legacy.c \ 1513 tcp_server_legacy.c \
1505 tcp_service_legacy.c \ 1514 tcp_service_legacy.c \
1506test_communicator_unix_peer1.conf \ 1515test_communicator_basic_unix_peer1.conf \
1507test_communicator_unix_peer2.conf \ 1516test_communicator_basic_unix_peer2.conf \
1508test_communicator_tcp_peer1.conf \ 1517test_communicator_basic_tcp_peer1.conf \
1509test_communicator_tcp_peer2.conf \ 1518test_communicator_basic_tcp_peer2.conf \
1510test_communicator_udp_peer1.conf \ 1519test_communicator_basic_udp_peer1.conf \
1511test_communicator_udp_peer2.conf 1520test_communicator_basic_udp_peer2.conf \
1521test_communicator_rekey_tcp_peer1.conf \
1522test_communicator_rekey_tcp_peer2.conf
diff --git a/src/transport/test_communicator_basic.c b/src/transport/test_communicator_basic.c
index 0d6df751a..4699b8dd1 100644
--- a/src/transport/test_communicator_basic.c
+++ b/src/transport/test_communicator_basic.c
@@ -509,10 +509,17 @@ main (int argc,
509{ 509{
510 struct GNUNET_CRYPTO_EddsaPrivateKey *private_key; 510 struct GNUNET_CRYPTO_EddsaPrivateKey *private_key;
511 char *communicator_name; 511 char *communicator_name;
512 char *test_mode;
513 char *test_name;
512 char *cfg_peer; 514 char *cfg_peer;
513 515
514 ret = 1; 516 ret = 1;
515 communicator_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); 517 test_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
518 communicator_name = strchr (test_name, '-');
519 communicator_name[0] = '\0';
520 communicator_name++;
521 test_mode = test_name;
522
516 GNUNET_asprintf (&communicator_binary, 523 GNUNET_asprintf (&communicator_binary,
517 "gnunet-communicator-%s", 524 "gnunet-communicator-%s",
518 communicator_name); 525 communicator_name);
@@ -528,8 +535,8 @@ main (int argc,
528 for (unsigned int i = 0; i < NUM_PEERS; i++) 535 for (unsigned int i = 0; i < NUM_PEERS; i++)
529 { 536 {
530 GNUNET_asprintf ((&cfg_peer), 537 GNUNET_asprintf ((&cfg_peer),
531 "test_communicator_%s_peer%u.conf", 538 "test_communicator_%s_%s_peer%u.conf",
532 communicator_name, i + 1); 539 communicator_name, test_mode, i + 1);
533 cfg_peers_name[i] = cfg_peer; 540 cfg_peers_name[i] = cfg_peer;
534 cfg_peers[i] = GNUNET_CONFIGURATION_create (); 541 cfg_peers[i] = GNUNET_CONFIGURATION_create ();
535 if (GNUNET_YES == 542 if (GNUNET_YES ==