From: xrs Date: Wed, 8 Jan 2020 20:05:49 +0000 (+0100) Subject: add test to Makefile.am X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=23b78e32541f6cbdc0dfe58a7cc9fb22859912d2;p=oweals%2Fgnunet.git add test to Makefile.am --- diff --git a/src/cadet/Makefile.am b/src/cadet/Makefile.am index d63ff6818..b197e8a00 100644 --- a/src/cadet/Makefile.am +++ b/src/cadet/Makefile.am @@ -212,6 +212,9 @@ test_cadet_5_reopen_SOURCES = \ test_cadet.c test_cadet_5_reopen_LDADD = $(ld_cadet_test_lib) +test_cadet_2_destroy_SOURCES = \ + test_cadet.c +test_cadet_2_destroy_LDADD = $(ld_cadet_test_lib) if ENABLE_TEST_RUN AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index 4b7c16ec5..bfad940c2 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c @@ -967,8 +967,9 @@ connect_handler (void *cls, channel); ok++; GNUNET_log (GNUNET_ERROR_TYPE_INFO, - " ok: %d\n", - ok); + " ok: (%d\n", + ok, + ok_goal); if (peer == peers_requested - 1) { if (NULL != incoming_ch) @@ -1343,6 +1344,11 @@ main (int argc, char *argv[]) // */ ok_goal = 6; } + else if (strstr (argv[0], "_destroy") != NULL) + { + test = DESTROY; + test_name = "destroy"; + } else { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "UNKNOWN\n");