aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-10-25 09:54:20 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-10-25 09:54:20 +0200
commit301de32f0f5e0664f5038c745ff044ef91d75630 (patch)
tree3592b84453317d2a1fd8fbd8f6c1e3d6f6295839
parent94109410c7a99d92028f63936e110f1dacd9156a (diff)
downloadgnunet-301de32f0f5e0664f5038c745ff044ef91d75630.tar.gz
gnunet-301de32f0f5e0664f5038c745ff044ef91d75630.zip
HELLO: Fixup missing tests
-rw-r--r--src/lib/hello/Makefile.am24
-rw-r--r--src/lib/hello/test_hello-uri.c9
2 files changed, 6 insertions, 27 deletions
diff --git a/src/lib/hello/Makefile.am b/src/lib/hello/Makefile.am
index cbc193a0a..c7b3e4a05 100644
--- a/src/lib/hello/Makefile.am
+++ b/src/lib/hello/Makefile.am
@@ -18,38 +18,16 @@ libgnunethello_la_LDFLAGS = \
18 -version-info 1:0:1 18 -version-info 1:0:1
19 19
20check_PROGRAMS = \ 20check_PROGRAMS = \
21 test_hello \ 21 test_hello-uri
22 test_hello-uri \
23 test_friend_hello \
24 test_hello-ng
25 22
26if ENABLE_TEST_RUN 23if ENABLE_TEST_RUN
27AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; 24AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
28TESTS = $(check_PROGRAMS) 25TESTS = $(check_PROGRAMS)
29endif 26endif
30 27
31test_hello_SOURCES = \
32 test_hello.c
33test_hello_LDADD = \
34 libgnunethello.la \
35 $(top_builddir)/src/lib/util/libgnunetutil.la
36
37test_hello_ng_SOURCES = \
38 test_hello-ng.c
39test_hello_ng_LDADD = \
40 libgnunethello.la \
41 $(top_builddir)/src/lib/util/libgnunetutil.la
42
43test_hello_uri_SOURCES = \ 28test_hello_uri_SOURCES = \
44 test_hello-uri.c 29 test_hello-uri.c
45test_hello_uri_LDADD = \ 30test_hello_uri_LDADD = \
46 libgnunethello.la \ 31 libgnunethello.la \
47 $(top_builddir)/src/lib/util/libgnunetutil.la \ 32 $(top_builddir)/src/lib/util/libgnunetutil.la \
48 -lgcrypt 33 -lgcrypt
49
50
51test_friend_hello_SOURCES = \
52 test_friend_hello.c
53test_friend_hello_LDADD = \
54 libgnunethello.la \
55 $(top_builddir)/src/lib/util/libgnunetutil.la
diff --git a/src/lib/hello/test_hello-uri.c b/src/lib/hello/test_hello-uri.c
index 1062f446b..bebed671b 100644
--- a/src/lib/hello/test_hello-uri.c
+++ b/src/lib/hello/test_hello-uri.c
@@ -22,6 +22,7 @@
22 * @brief test for helper library for handling URI-based HELLOs 22 * @brief test for helper library for handling URI-based HELLOs
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "gnunet_time_lib.h"
25#include "platform.h" 26#include "platform.h"
26#include "gnunet_signatures.h" 27#include "gnunet_signatures.h"
27#include "gnunet_hello_uri_lib.h" 28#include "gnunet_hello_uri_lib.h"
@@ -96,13 +97,13 @@ main (int argc,
96 &priv, 97 &priv,
97 NULL, 98 NULL,
98 &block_size, 99 &block_size,
99 NULL)); 100 GNUNET_TIME_UNIT_FOREVER_REL));
100 GNUNET_assert (GNUNET_NO == 101 GNUNET_assert (GNUNET_NO ==
101 GNUNET_HELLO_builder_to_block (b, 102 GNUNET_HELLO_builder_to_block (b,
102 &priv, 103 &priv,
103 NULL, 104 NULL,
104 &block_size, 105 &block_size,
105 NULL)); 106 GNUNET_TIME_UNIT_FOREVER_REL));
106 GNUNET_assert (0 != block_size); 107 GNUNET_assert (0 != block_size);
107 block = GNUNET_malloc (block_size); 108 block = GNUNET_malloc (block_size);
108 GNUNET_assert (GNUNET_OK == 109 GNUNET_assert (GNUNET_OK ==
@@ -110,7 +111,7 @@ main (int argc,
110 &priv, 111 &priv,
111 block, 112 block,
112 &block_size, 113 &block_size,
113 NULL)); 114 GNUNET_TIME_UNIT_FOREVER_REL));
114 b2 = GNUNET_HELLO_builder_from_block (block, 115 b2 = GNUNET_HELLO_builder_from_block (block,
115 block_size); 116 block_size);
116 GNUNET_free (block); 117 GNUNET_free (block);
@@ -158,7 +159,7 @@ main (int argc,
158 159
159 env = GNUNET_HELLO_builder_to_env (b, 160 env = GNUNET_HELLO_builder_to_env (b,
160 &priv, 161 &priv,
161 NULL); 162 GNUNET_TIME_UNIT_FOREVER_REL);
162 b2 = GNUNET_HELLO_builder_from_msg (GNUNET_MQ_env_get_msg (env)); 163 b2 = GNUNET_HELLO_builder_from_msg (GNUNET_MQ_env_get_msg (env));
163 GNUNET_free (env); 164 GNUNET_free (env);
164 GNUNET_assert (NULL != b2); 165 GNUNET_assert (NULL != b2);