From 68c1810604ffbe7ffe95cdd54785baffc159d956 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Tue, 31 Dec 2019 13:11:51 +0900 Subject: [PATCH] rename tests to dertermine test mode --- src/transport/Makefile.am | 29 +++++++++++++++++-------- src/transport/test_communicator_basic.c | 13 ++++++++--- 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 += \ test_transport_api_udp_nat \ test_transport_api_reliability_udp \ test_quota_compliance_udp \ - test_communicator_basic_unix \ - test_communicator_basic_tcp \ - test_communicator_basic_udp + test_communicator_basic-unix \ + test_communicator_basic-tcp \ + test_communicator_basic-udp \ + test_communicator_rekey-tcp endif endif @@ -804,6 +805,14 @@ test_communicator_basic_udp_LDADD = \ libgnunettransporttesting2.la \ $(top_builddir)/src/testing/libgnunettesting.la \ $(top_builddir)/src/util/libgnunetutil.la + +test_communicator_rekey_tcp_SOURCES = \ + test_communicator_basic.c +test_communicator_rekey_tcp_LDADD = \ + libgnunettransporttesting2.la \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + endif test_plugin_unix_SOURCES = \ @@ -1503,9 +1512,11 @@ test_transport_api_slow_ats_peer2.conf \ tcp_server_mst_legacy.c \ tcp_server_legacy.c \ tcp_service_legacy.c \ -test_communicator_unix_peer1.conf \ -test_communicator_unix_peer2.conf \ -test_communicator_tcp_peer1.conf \ -test_communicator_tcp_peer2.conf \ -test_communicator_udp_peer1.conf \ -test_communicator_udp_peer2.conf +test_communicator_basic_unix_peer1.conf \ +test_communicator_basic_unix_peer2.conf \ +test_communicator_basic_tcp_peer1.conf \ +test_communicator_basic_tcp_peer2.conf \ +test_communicator_basic_udp_peer1.conf \ +test_communicator_basic_udp_peer2.conf \ +test_communicator_rekey_tcp_peer1.conf \ +test_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, { struct GNUNET_CRYPTO_EddsaPrivateKey *private_key; char *communicator_name; + char *test_mode; + char *test_name; char *cfg_peer; ret = 1; - communicator_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); + test_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); + communicator_name = strchr (test_name, '-'); + communicator_name[0] = '\0'; + communicator_name++; + test_mode = test_name; + GNUNET_asprintf (&communicator_binary, "gnunet-communicator-%s", communicator_name); @@ -528,8 +535,8 @@ main (int argc, for (unsigned int i = 0; i < NUM_PEERS; i++) { GNUNET_asprintf ((&cfg_peer), - "test_communicator_%s_peer%u.conf", - communicator_name, i + 1); + "test_communicator_%s_%s_peer%u.conf", + communicator_name, test_mode, i + 1); cfg_peers_name[i] = cfg_peer; cfg_peers[i] = GNUNET_CONFIGURATION_create (); if (GNUNET_YES == -- 2.25.1