rename tests to dertermine test mode
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 31 Dec 2019 04:11:51 +0000 (13:11 +0900)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 31 Dec 2019 04:11:51 +0000 (13:11 +0900)
src/transport/Makefile.am
src/transport/test_communicator_basic.c

index e037f30017075ab677c229200e569732732326ce..7dbff2d445608a008f2fb1ca6ab6c7d8ce4e433c 100644 (file)
@@ -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
index 0d6df751a4a169a7c69d64f07f8418c5772347a0..4699b8dd1efe337198172fbe409c73917e8372bd 100644 (file)
@@ -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 ==