diff options
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | src/plugin/namestore/Makefile.am | 360 | ||||
-rw-r--r-- | src/plugin/namestore/meson.build | 27 | ||||
-rw-r--r-- | src/plugin/namestore/test_plugin_namestore.c | 1 | ||||
-rw-r--r-- | src/service/namestore/Makefile.am | 347 | ||||
-rw-r--r-- | src/service/namestore/meson.build | 56 | ||||
-rw-r--r-- | src/service/namestore/perf_namestore_api_import.c (renamed from src/plugin/namestore/perf_namestore_api_import.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/perf_namestore_api_postgres.conf (renamed from src/plugin/namestore/perf_namestore_api_postgres.conf) | 0 | ||||
-rw-r--r-- | src/service/namestore/perf_namestore_api_sqlite.conf (renamed from src/plugin/namestore/perf_namestore_api_sqlite.conf) | 0 | ||||
-rw-r--r-- | src/service/namestore/perf_namestore_api_zone_iteration.c (renamed from src/plugin/namestore/perf_namestore_api_zone_iteration.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_common.c (renamed from src/plugin/namestore/test_common.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api.conf (renamed from src/plugin/namestore/test_namestore_api.conf) | 4 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_edit_records.c (renamed from src/plugin/namestore/test_namestore_api_edit_records.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_lookup_nick.c (renamed from src/plugin/namestore/test_namestore_api_lookup_nick.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_monitoring.c (renamed from src/plugin/namestore/test_namestore_api_monitoring.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_monitoring_existing.c (renamed from src/plugin/namestore/test_namestore_api_monitoring_existing.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_postgres.conf (renamed from src/plugin/namestore/test_namestore_api_postgres.conf) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_remove.c (renamed from src/plugin/namestore/test_namestore_api_remove.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_remove_not_existing_record.c (renamed from src/plugin/namestore/test_namestore_api_remove_not_existing_record.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_sqlite.conf (renamed from src/plugin/namestore/test_namestore_api_sqlite.conf) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_store.c (renamed from src/plugin/namestore/test_namestore_api_store.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_store_update.c (renamed from src/plugin/namestore/test_namestore_api_store_update.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_tx_rollback.c (renamed from src/plugin/namestore/test_namestore_api_tx_rollback.c) | 0 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_zone_iteration.c (renamed from src/plugin/namestore/test_namestore_api_zone_iteration.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_zone_iteration_nick.c (renamed from src/plugin/namestore/test_namestore_api_zone_iteration_nick.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c (renamed from src/plugin/namestore/test_namestore_api_zone_iteration_specific_zone.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_zone_iteration_stop.c (renamed from src/plugin/namestore/test_namestore_api_zone_iteration_stop.c) | 2 | ||||
-rw-r--r-- | src/service/namestore/test_namestore_api_zone_to_name.c (renamed from src/plugin/namestore/test_namestore_api_zone_to_name.c) | 2 | ||||
-rw-r--r-- | src/service/util/meson.build | 13 | ||||
-rw-r--r-- | src/service/util/test_resolver_api.c | 2 |
30 files changed, 470 insertions, 359 deletions
diff --git a/meson.build b/meson.build index ba9e4b3c9..39ac14eb8 100644 --- a/meson.build +++ b/meson.build | |||
@@ -420,6 +420,7 @@ pkg = import('pkgconfig') | |||
420 | subdir('src') | 420 | subdir('src') |
421 | subdir('doc') | 421 | subdir('doc') |
422 | subdir('contrib') | 422 | subdir('contrib') |
423 | subdir('data') | ||
423 | 424 | ||
424 | meson.add_dist_script('meson-dist-script') | 425 | meson.add_dist_script('meson-dist-script') |
425 | 426 | ||
diff --git a/src/plugin/namestore/Makefile.am b/src/plugin/namestore/Makefile.am index 03b743d7a..3db174225 100644 --- a/src/plugin/namestore/Makefile.am +++ b/src/plugin/namestore/Makefile.am | |||
@@ -19,62 +19,7 @@ if USE_COVERAGE | |||
19 | endif | 19 | endif |
20 | 20 | ||
21 | 21 | ||
22 | if HAVE_SQLITE | ||
23 | SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la | ||
24 | SQLITE_TESTS = test_plugin_namestore_sqlite \ | ||
25 | test_namestore_api_store_sqlite \ | ||
26 | test_namestore_api_store_update_sqlite \ | ||
27 | test_namestore_api_zone_iteration_sqlite \ | ||
28 | test_namestore_api_remove_sqlite \ | ||
29 | test_namestore_api_lookup_nick_sqlite \ | ||
30 | test_namestore_api_monitoring_sqlite \ | ||
31 | test_namestore_api_remove_not_existing_record_sqlite \ | ||
32 | test_namestore_api_zone_iteration_nick_sqlite \ | ||
33 | test_namestore_api_zone_iteration_specific_zone_sqlite \ | ||
34 | test_namestore_api_zone_iteration_stop_sqlite \ | ||
35 | test_namestore_api_monitoring_existing_sqlite \ | ||
36 | test_namestore_api_zone_to_name_sqlite \ | ||
37 | perf_namestore_api_zone_iteration_sqlite \ | ||
38 | perf_namestore_api_import_sqlite \ | ||
39 | perf_namestore_api_import_postgres \ | ||
40 | test_namestore_api_tx_rollback_sqlite | ||
41 | endif | ||
42 | |||
43 | |||
44 | if HAVE_POSTGRESQL | ||
45 | POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la | ||
46 | POSTGRES_TESTS = test_plugin_namestore_postgres \ | ||
47 | test_namestore_api_store_postgres \ | ||
48 | test_namestore_api_store_update_postgres \ | ||
49 | test_namestore_api_remove_postgres \ | ||
50 | test_namestore_api_zone_iteration_postgres \ | ||
51 | test_namestore_api_lookup_nick_postgres \ | ||
52 | test_namestore_api_monitoring_postgres \ | ||
53 | test_namestore_api_remove_not_existing_record_postgres \ | ||
54 | test_namestore_api_zone_iteration_nick_postgres \ | ||
55 | test_namestore_api_zone_iteration_specific_zone_postgres \ | ||
56 | test_namestore_api_zone_iteration_stop_postgres \ | ||
57 | test_namestore_api_monitoring_existing_postgres \ | ||
58 | test_namestore_api_zone_to_name_postgres \ | ||
59 | perf_namestore_api_zone_iteration_postgres \ | ||
60 | test_namestore_api_tx_rollback_postgres | ||
61 | if HAVE_EXPERIMENTAL | ||
62 | POSTGRES_TESTS += test_namestore_api_edit_records_postgres | ||
63 | endif | ||
64 | endif | ||
65 | |||
66 | if HAVE_SQLITE | ||
67 | check_PROGRAMS = \ | ||
68 | $(SQLITE_TESTS) \ | ||
69 | $(POSTGRES_TESTS) | ||
70 | endif | ||
71 | 22 | ||
72 | if ENABLE_TEST_RUN | ||
73 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | ||
74 | TESTS = \ | ||
75 | $(check_PROGRAMS) \ | ||
76 | $(check_SCRIPTS) | ||
77 | endif | ||
78 | 23 | ||
79 | plugin_LTLIBRARIES = \ | 24 | plugin_LTLIBRARIES = \ |
80 | $(SQLITE_PLUGIN) \ | 25 | $(SQLITE_PLUGIN) \ |
@@ -101,311 +46,34 @@ libgnunet_plugin_namestore_postgres_la_LIBADD = \ | |||
101 | libgnunet_plugin_namestore_postgres_la_LDFLAGS = \ | 46 | libgnunet_plugin_namestore_postgres_la_LDFLAGS = \ |
102 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | 47 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) |
103 | 48 | ||
104 | test_namestore_api_store_sqlite_SOURCES = \ | 49 | if HAVE_SQLITE |
105 | test_namestore_api_store.c | 50 | SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la |
106 | test_namestore_api_store_sqlite_LDADD = \ | 51 | SQLITE_TESTS = test_plugin_namestore_sqlite |
107 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
108 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
109 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
110 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
111 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
112 | |||
113 | test_namestore_api_store_postgres_SOURCES = \ | ||
114 | test_namestore_api_store.c | ||
115 | test_namestore_api_store_postgres_LDADD = \ | ||
116 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
117 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
118 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
119 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
120 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
121 | |||
122 | test_namestore_api_store_update_sqlite_SOURCES = \ | ||
123 | test_namestore_api_store_update.c | ||
124 | test_namestore_api_store_update_sqlite_LDADD = \ | ||
125 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
126 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
127 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
128 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
129 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
130 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
131 | |||
132 | test_namestore_api_store_update_postgres_SOURCES = \ | ||
133 | test_namestore_api_store_update.c | ||
134 | test_namestore_api_store_update_postgres_LDADD = \ | ||
135 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
136 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
137 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
138 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
139 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
140 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
141 | |||
142 | test_namestore_api_lookup_nick_sqlite_SOURCES = \ | ||
143 | test_namestore_api_lookup_nick.c | ||
144 | test_namestore_api_lookup_nick_sqlite_LDADD = \ | ||
145 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
146 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
147 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
148 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
149 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
150 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
151 | |||
152 | test_namestore_api_lookup_nick_postgres_SOURCES = \ | ||
153 | test_namestore_api_lookup_nick.c | ||
154 | test_namestore_api_lookup_nick_postgres_LDADD = \ | ||
155 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
156 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
157 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
158 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
159 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
160 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
161 | |||
162 | test_namestore_api_remove_sqlite_SOURCES = \ | ||
163 | test_namestore_api_remove.c | ||
164 | test_namestore_api_remove_sqlite_LDADD = \ | ||
165 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
166 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
167 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
168 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
169 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
170 | |||
171 | test_namestore_api_remove_postgres_SOURCES = \ | ||
172 | test_namestore_api_remove.c | ||
173 | test_namestore_api_remove_postgres_LDADD = \ | ||
174 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
175 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
176 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
177 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
178 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
179 | |||
180 | test_namestore_api_remove_not_existing_record_sqlite_SOURCES = \ | ||
181 | test_namestore_api_remove_not_existing_record.c | ||
182 | test_namestore_api_remove_not_existing_record_sqlite_LDADD = \ | ||
183 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
184 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
185 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
186 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
187 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
188 | |||
189 | test_namestore_api_remove_not_existing_record_postgres_SOURCES = \ | ||
190 | test_namestore_api_remove_not_existing_record.c | ||
191 | test_namestore_api_remove_not_existing_record_postgres_LDADD = \ | ||
192 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
193 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
194 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
195 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
196 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
197 | |||
198 | test_namestore_api_zone_to_name_sqlite_SOURCES = \ | ||
199 | test_namestore_api_zone_to_name.c | ||
200 | test_namestore_api_zone_to_name_sqlite_LDADD = \ | ||
201 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
202 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
203 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
204 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
205 | |||
206 | test_namestore_api_zone_to_name_postgres_SOURCES = \ | ||
207 | test_namestore_api_zone_to_name.c | ||
208 | test_namestore_api_zone_to_name_postgres_LDADD = \ | ||
209 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
210 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
211 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
212 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
213 | |||
214 | test_namestore_api_monitoring_sqlite_SOURCES = \ | ||
215 | test_namestore_api_monitoring.c | ||
216 | test_namestore_api_monitoring_sqlite_LDADD = \ | ||
217 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
218 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
219 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
220 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
221 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
222 | |||
223 | test_namestore_api_monitoring_postgres_SOURCES = \ | ||
224 | test_namestore_api_monitoring.c | ||
225 | test_namestore_api_monitoring_postgres_LDADD = \ | ||
226 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
227 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
228 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
229 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
230 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
231 | |||
232 | test_namestore_api_monitoring_existing_sqlite_SOURCES = \ | ||
233 | test_namestore_api_monitoring_existing.c | ||
234 | test_namestore_api_monitoring_existing_sqlite_LDADD = \ | ||
235 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
236 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
237 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
238 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
239 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
240 | |||
241 | test_namestore_api_monitoring_existing_postgres_SOURCES = \ | ||
242 | test_namestore_api_monitoring_existing.c | ||
243 | test_namestore_api_monitoring_existing_postgres_LDADD = \ | ||
244 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
245 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
246 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
247 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
248 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
249 | |||
250 | test_namestore_api_tx_rollback_sqlite_SOURCES = \ | ||
251 | test_namestore_api_tx_rollback.c | ||
252 | test_namestore_api_tx_rollback_sqlite_LDADD = \ | ||
253 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
254 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
255 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
256 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
257 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
258 | |||
259 | test_namestore_api_tx_rollback_postgres_SOURCES = \ | ||
260 | test_namestore_api_tx_rollback.c | ||
261 | test_namestore_api_tx_rollback_postgres_LDADD = \ | ||
262 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
263 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
264 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
265 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
266 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
267 | |||
268 | if HAVE_EXPERIMENTAL | ||
269 | test_namestore_api_edit_records_postgres_SOURCES = \ | ||
270 | test_namestore_api_edit_records.c | ||
271 | test_namestore_api_edit_records_postgres_LDADD = \ | ||
272 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
273 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
274 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
275 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
276 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
277 | endif | 52 | endif |
278 | 53 | ||
279 | test_namestore_api_zone_iteration_sqlite_SOURCES = \ | ||
280 | test_namestore_api_zone_iteration.c | ||
281 | test_namestore_api_zone_iteration_sqlite_LDADD = \ | ||
282 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
283 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
284 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
285 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
286 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
287 | |||
288 | test_namestore_api_zone_iteration_postgres_SOURCES = \ | ||
289 | test_namestore_api_zone_iteration.c | ||
290 | test_namestore_api_zone_iteration_postgres_LDADD = \ | ||
291 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
292 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
293 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
294 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
295 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
296 | |||
297 | perf_namestore_api_zone_iteration_postgres_SOURCES = \ | ||
298 | perf_namestore_api_zone_iteration.c | ||
299 | perf_namestore_api_zone_iteration_postgres_LDADD = \ | ||
300 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
301 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
302 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
303 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
304 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
305 | |||
306 | perf_namestore_api_import_sqlite_SOURCES = \ | ||
307 | perf_namestore_api_import.c | ||
308 | perf_namestore_api_import_sqlite_LDADD = \ | ||
309 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
310 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
311 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
312 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
313 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
314 | |||
315 | perf_namestore_api_import_postgres_SOURCES = \ | ||
316 | perf_namestore_api_import.c | ||
317 | perf_namestore_api_import_postgres_LDADD = \ | ||
318 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
319 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
320 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
321 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
322 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
323 | |||
324 | 54 | ||
325 | perf_namestore_api_zone_iteration_sqlite_SOURCES = \ | 55 | if HAVE_POSTGRESQL |
326 | perf_namestore_api_zone_iteration.c | 56 | POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la |
327 | perf_namestore_api_zone_iteration_sqlite_LDADD = \ | 57 | POSTGRES_TESTS = test_plugin_namestore_postgres |
328 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | 58 | endif |
329 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | 59 | if HAVE_SQLITE |
330 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | 60 | check_PROGRAMS = \ |
331 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | 61 | $(SQLITE_TESTS) \ |
332 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | 62 | $(POSTGRES_TESTS) |
333 | 63 | endif | |
334 | test_namestore_api_zone_iteration_nick_sqlite_SOURCES = \ | ||
335 | test_namestore_api_zone_iteration_nick.c | ||
336 | test_namestore_api_zone_iteration_nick_sqlite_LDADD = \ | ||
337 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
338 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
339 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
340 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
341 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
342 | |||
343 | test_namestore_api_zone_iteration_nick_postgres_SOURCES = \ | ||
344 | test_namestore_api_zone_iteration_nick.c | ||
345 | test_namestore_api_zone_iteration_nick_postgres_LDADD = \ | ||
346 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
347 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
348 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
349 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
350 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
351 | |||
352 | test_namestore_api_zone_iteration_specific_zone_sqlite_SOURCES = \ | ||
353 | test_namestore_api_zone_iteration_specific_zone.c | ||
354 | test_namestore_api_zone_iteration_specific_zone_sqlite_LDADD = \ | ||
355 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
356 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
357 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
358 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
359 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
360 | |||
361 | test_namestore_api_zone_iteration_specific_zone_postgres_SOURCES = \ | ||
362 | test_namestore_api_zone_iteration_specific_zone.c | ||
363 | test_namestore_api_zone_iteration_specific_zone_postgres_LDADD = \ | ||
364 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
365 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
366 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
367 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
368 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
369 | |||
370 | test_namestore_api_zone_iteration_stop_sqlite_SOURCES = \ | ||
371 | test_namestore_api_zone_iteration_stop.c | ||
372 | test_namestore_api_zone_iteration_stop_sqlite_LDADD = \ | ||
373 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
374 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
375 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
376 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
377 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
378 | |||
379 | test_namestore_api_zone_iteration_stop_postgres_SOURCES = \ | ||
380 | test_namestore_api_zone_iteration_stop.c | ||
381 | test_namestore_api_zone_iteration_stop_postgres_LDADD = \ | ||
382 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
383 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
384 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
385 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
386 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
387 | 64 | ||
388 | test_plugin_namestore_sqlite_SOURCES = \ | 65 | test_plugin_namestore_sqlite_SOURCES = \ |
389 | test_plugin_namestore.c | 66 | test_plugin_namestore.c |
390 | test_plugin_namestore_sqlite_LDADD = \ | 67 | test_plugin_namestore_sqlite_LDADD = \ |
391 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
392 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
393 | $(top_builddir)/src/lib/util/libgnunetutil.la | 68 | $(top_builddir)/src/lib/util/libgnunetutil.la |
394 | 69 | ||
395 | test_plugin_namestore_postgres_SOURCES = \ | 70 | test_plugin_namestore_postgres_SOURCES = \ |
396 | test_plugin_namestore.c | 71 | test_plugin_namestore.c |
397 | test_plugin_namestore_postgres_LDADD = \ | 72 | test_plugin_namestore_postgres_LDADD = \ |
398 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
399 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
400 | $(top_builddir)/src/lib/util/libgnunetutil.la | 73 | $(top_builddir)/src/lib/util/libgnunetutil.la |
401 | 74 | ||
402 | EXTRA_DIST = \ | 75 | EXTRA_DIST = \ |
403 | test_common.c \ | ||
404 | test_namestore_api.conf \ | ||
405 | test_namestore_api_postgres.conf \ | ||
406 | test_namestore_api_sqlite.conf \ | ||
407 | perf_namestore_api_postgres.conf \ | ||
408 | perf_namestore_api_sqlite.conf \ | ||
409 | test_plugin_namestore_sqlite.conf \ | 76 | test_plugin_namestore_sqlite.conf \ |
410 | test_plugin_namestore_postgres.conf \ | 77 | test_plugin_namestore_postgres.conf \ |
411 | $(sql_DATA) | 78 | $(sql_DATA) |
79 | |||
diff --git a/src/plugin/namestore/meson.build b/src/plugin/namestore/meson.build index d51b4b730..4a077915d 100644 --- a/src/plugin/namestore/meson.build +++ b/src/plugin/namestore/meson.build | |||
@@ -10,6 +10,10 @@ shared_module('gnunet_plugin_namestore_sqlite', | |||
10 | install: true, | 10 | install: true, |
11 | install_dir: get_option('libdir')/'gnunet') | 11 | install_dir: get_option('libdir')/'gnunet') |
12 | 12 | ||
13 | configure_file(copy: true, | ||
14 | input: 'test_plugin_namestore_sqlite.conf', | ||
15 | output: 'test_plugin_namestore_sqlite.conf') | ||
16 | |||
13 | if pq_dep.found() | 17 | if pq_dep.found() |
14 | shared_module('gnunet_plugin_namestore_postgres', | 18 | shared_module('gnunet_plugin_namestore_postgres', |
15 | ['plugin_namestore_postgres.c'], | 19 | ['plugin_namestore_postgres.c'], |
@@ -20,5 +24,28 @@ if pq_dep.found() | |||
20 | include_directories: [incdir, configuration_inc], | 24 | include_directories: [incdir, configuration_inc], |
21 | install: true, | 25 | install: true, |
22 | install_dir: get_option('libdir')/'gnunet') | 26 | install_dir: get_option('libdir')/'gnunet') |
27 | configure_file(copy: true, | ||
28 | input: 'test_plugin_namestore_postgres.conf', | ||
29 | output: 'test_plugin_namestore_postgres.conf') | ||
30 | |||
31 | testpluginnamestore_pq = executable ('test_plugin_namestore_postgres', | ||
32 | ['test_plugin_namestore.c'], | ||
33 | dependencies: [ | ||
34 | libgnunetutil_dep | ||
35 | ], | ||
36 | include_directories: [incdir, configuration_inc], | ||
37 | install: false) | ||
38 | test('test_plugin_namestore_postgres', testpluginnamestore_pq, workdir: meson.current_build_dir(), | ||
39 | suite: 'namestore') | ||
23 | endif | 40 | endif |
24 | 41 | ||
42 | testpluginnamestore_sq = executable ('test_plugin_namestore_sqlite', | ||
43 | ['test_plugin_namestore.c'], | ||
44 | dependencies: [ | ||
45 | libgnunetutil_dep | ||
46 | ], | ||
47 | include_directories: [incdir, configuration_inc], | ||
48 | install: false) | ||
49 | test('test_plugin_namestore_sqlite', testpluginnamestore_sq, workdir: meson.current_build_dir(), | ||
50 | suite: 'namestore') | ||
51 | |||
diff --git a/src/plugin/namestore/test_plugin_namestore.c b/src/plugin/namestore/test_plugin_namestore.c index 388b23f57..d471253ca 100644 --- a/src/plugin/namestore/test_plugin_namestore.c +++ b/src/plugin/namestore/test_plugin_namestore.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_namestore_plugin.h" | 27 | #include "gnunet_namestore_plugin.h" |
28 | #include "gnunet_testing_lib.h" | ||
29 | 28 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
31 | 30 | ||
diff --git a/src/service/namestore/Makefile.am b/src/service/namestore/Makefile.am index 7f49e680f..d8f6a5318 100644 --- a/src/service/namestore/Makefile.am +++ b/src/service/namestore/Makefile.am | |||
@@ -61,3 +61,350 @@ gnunet_service_namestore_LDADD = \ | |||
61 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | 61 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
62 | libgnunetnamestore.la \ | 62 | libgnunetnamestore.la \ |
63 | $(GN_LIBINTL) | 63 | $(GN_LIBINTL) |
64 | |||
65 | if HAVE_SQLITE | ||
66 | SQLITE_TESTS = \ | ||
67 | test_namestore_api_store_sqlite \ | ||
68 | test_namestore_api_store_update_sqlite \ | ||
69 | test_namestore_api_zone_iteration_sqlite \ | ||
70 | test_namestore_api_remove_sqlite \ | ||
71 | test_namestore_api_lookup_nick_sqlite \ | ||
72 | test_namestore_api_monitoring_sqlite \ | ||
73 | test_namestore_api_remove_not_existing_record_sqlite \ | ||
74 | test_namestore_api_zone_iteration_nick_sqlite \ | ||
75 | test_namestore_api_zone_iteration_specific_zone_sqlite \ | ||
76 | test_namestore_api_zone_iteration_stop_sqlite \ | ||
77 | test_namestore_api_monitoring_existing_sqlite \ | ||
78 | test_namestore_api_zone_to_name_sqlite \ | ||
79 | perf_namestore_api_zone_iteration_sqlite \ | ||
80 | perf_namestore_api_import_sqlite \ | ||
81 | perf_namestore_api_import_postgres \ | ||
82 | test_namestore_api_tx_rollback_sqlite | ||
83 | endif | ||
84 | |||
85 | |||
86 | if HAVE_POSTGRESQL | ||
87 | POSTGRES_TESTS = \ | ||
88 | test_namestore_api_store_postgres \ | ||
89 | test_namestore_api_store_update_postgres \ | ||
90 | test_namestore_api_remove_postgres \ | ||
91 | test_namestore_api_zone_iteration_postgres \ | ||
92 | test_namestore_api_lookup_nick_postgres \ | ||
93 | test_namestore_api_monitoring_postgres \ | ||
94 | test_namestore_api_remove_not_existing_record_postgres \ | ||
95 | test_namestore_api_zone_iteration_nick_postgres \ | ||
96 | test_namestore_api_zone_iteration_specific_zone_postgres \ | ||
97 | test_namestore_api_zone_iteration_stop_postgres \ | ||
98 | test_namestore_api_monitoring_existing_postgres \ | ||
99 | test_namestore_api_zone_to_name_postgres \ | ||
100 | perf_namestore_api_zone_iteration_postgres \ | ||
101 | test_namestore_api_tx_rollback_postgres | ||
102 | if HAVE_EXPERIMENTAL | ||
103 | POSTGRES_TESTS += test_namestore_api_edit_records_postgres | ||
104 | endif | ||
105 | endif | ||
106 | |||
107 | check_PROGRAMS = \ | ||
108 | $(SQLITE_TESTS) \ | ||
109 | $(POSTGRES_TESTS) | ||
110 | |||
111 | if ENABLE_TEST_RUN | ||
112 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | ||
113 | TESTS = \ | ||
114 | $(check_PROGRAMS) \ | ||
115 | $(check_SCRIPTS) | ||
116 | endif | ||
117 | |||
118 | test_namestore_api_store_sqlite_SOURCES = \ | ||
119 | test_namestore_api_store.c | ||
120 | test_namestore_api_store_sqlite_LDADD = \ | ||
121 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
122 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
123 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
124 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
125 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
126 | |||
127 | test_namestore_api_store_postgres_SOURCES = \ | ||
128 | test_namestore_api_store.c | ||
129 | test_namestore_api_store_postgres_LDADD = \ | ||
130 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
131 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
132 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
133 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
134 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
135 | |||
136 | test_namestore_api_store_update_sqlite_SOURCES = \ | ||
137 | test_namestore_api_store_update.c | ||
138 | test_namestore_api_store_update_sqlite_LDADD = \ | ||
139 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
140 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
141 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
142 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
143 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
144 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
145 | |||
146 | test_namestore_api_store_update_postgres_SOURCES = \ | ||
147 | test_namestore_api_store_update.c | ||
148 | test_namestore_api_store_update_postgres_LDADD = \ | ||
149 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
150 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
151 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
152 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
153 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
154 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
155 | |||
156 | test_namestore_api_lookup_nick_sqlite_SOURCES = \ | ||
157 | test_namestore_api_lookup_nick.c | ||
158 | test_namestore_api_lookup_nick_sqlite_LDADD = \ | ||
159 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
160 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
161 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
162 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
163 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
164 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
165 | |||
166 | test_namestore_api_lookup_nick_postgres_SOURCES = \ | ||
167 | test_namestore_api_lookup_nick.c | ||
168 | test_namestore_api_lookup_nick_postgres_LDADD = \ | ||
169 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
170 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
171 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
172 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
173 | $(top_builddir)/src/service/namecache/libgnunetnamecache.la \ | ||
174 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
175 | |||
176 | test_namestore_api_remove_sqlite_SOURCES = \ | ||
177 | test_namestore_api_remove.c | ||
178 | test_namestore_api_remove_sqlite_LDADD = \ | ||
179 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
180 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
181 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
182 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
183 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
184 | |||
185 | test_namestore_api_remove_postgres_SOURCES = \ | ||
186 | test_namestore_api_remove.c | ||
187 | test_namestore_api_remove_postgres_LDADD = \ | ||
188 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
189 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
190 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
191 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
192 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
193 | |||
194 | test_namestore_api_remove_not_existing_record_sqlite_SOURCES = \ | ||
195 | test_namestore_api_remove_not_existing_record.c | ||
196 | test_namestore_api_remove_not_existing_record_sqlite_LDADD = \ | ||
197 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
198 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
199 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
200 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
201 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
202 | |||
203 | test_namestore_api_remove_not_existing_record_postgres_SOURCES = \ | ||
204 | test_namestore_api_remove_not_existing_record.c | ||
205 | test_namestore_api_remove_not_existing_record_postgres_LDADD = \ | ||
206 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
207 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
208 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
209 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
210 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
211 | |||
212 | test_namestore_api_zone_to_name_sqlite_SOURCES = \ | ||
213 | test_namestore_api_zone_to_name.c | ||
214 | test_namestore_api_zone_to_name_sqlite_LDADD = \ | ||
215 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
216 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
217 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
218 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
219 | |||
220 | test_namestore_api_zone_to_name_postgres_SOURCES = \ | ||
221 | test_namestore_api_zone_to_name.c | ||
222 | test_namestore_api_zone_to_name_postgres_LDADD = \ | ||
223 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
224 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
225 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
226 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
227 | |||
228 | test_namestore_api_monitoring_sqlite_SOURCES = \ | ||
229 | test_namestore_api_monitoring.c | ||
230 | test_namestore_api_monitoring_sqlite_LDADD = \ | ||
231 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
232 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
233 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
234 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
235 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
236 | |||
237 | test_namestore_api_monitoring_postgres_SOURCES = \ | ||
238 | test_namestore_api_monitoring.c | ||
239 | test_namestore_api_monitoring_postgres_LDADD = \ | ||
240 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
241 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
242 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
243 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
244 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
245 | |||
246 | test_namestore_api_monitoring_existing_sqlite_SOURCES = \ | ||
247 | test_namestore_api_monitoring_existing.c | ||
248 | test_namestore_api_monitoring_existing_sqlite_LDADD = \ | ||
249 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
250 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
251 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
252 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
253 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
254 | |||
255 | test_namestore_api_monitoring_existing_postgres_SOURCES = \ | ||
256 | test_namestore_api_monitoring_existing.c | ||
257 | test_namestore_api_monitoring_existing_postgres_LDADD = \ | ||
258 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
259 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
260 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
261 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
262 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
263 | |||
264 | test_namestore_api_tx_rollback_sqlite_SOURCES = \ | ||
265 | test_namestore_api_tx_rollback.c | ||
266 | test_namestore_api_tx_rollback_sqlite_LDADD = \ | ||
267 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
268 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
269 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
270 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
271 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
272 | |||
273 | test_namestore_api_tx_rollback_postgres_SOURCES = \ | ||
274 | test_namestore_api_tx_rollback.c | ||
275 | test_namestore_api_tx_rollback_postgres_LDADD = \ | ||
276 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
277 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
278 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
279 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
280 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
281 | |||
282 | if HAVE_EXPERIMENTAL | ||
283 | test_namestore_api_edit_records_postgres_SOURCES = \ | ||
284 | test_namestore_api_edit_records.c | ||
285 | test_namestore_api_edit_records_postgres_LDADD = \ | ||
286 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
287 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
288 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ | ||
289 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
290 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
291 | endif | ||
292 | |||
293 | test_namestore_api_zone_iteration_sqlite_SOURCES = \ | ||
294 | test_namestore_api_zone_iteration.c | ||
295 | test_namestore_api_zone_iteration_sqlite_LDADD = \ | ||
296 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
297 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
298 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
299 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
300 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
301 | |||
302 | test_namestore_api_zone_iteration_postgres_SOURCES = \ | ||
303 | test_namestore_api_zone_iteration.c | ||
304 | test_namestore_api_zone_iteration_postgres_LDADD = \ | ||
305 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
306 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
307 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
308 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
309 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
310 | |||
311 | perf_namestore_api_zone_iteration_postgres_SOURCES = \ | ||
312 | perf_namestore_api_zone_iteration.c | ||
313 | perf_namestore_api_zone_iteration_postgres_LDADD = \ | ||
314 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
315 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
316 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
317 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
318 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
319 | |||
320 | perf_namestore_api_import_sqlite_SOURCES = \ | ||
321 | perf_namestore_api_import.c | ||
322 | perf_namestore_api_import_sqlite_LDADD = \ | ||
323 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
324 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
325 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
326 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
327 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
328 | |||
329 | perf_namestore_api_import_postgres_SOURCES = \ | ||
330 | perf_namestore_api_import.c | ||
331 | perf_namestore_api_import_postgres_LDADD = \ | ||
332 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
333 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
334 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
335 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
336 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
337 | |||
338 | |||
339 | perf_namestore_api_zone_iteration_sqlite_SOURCES = \ | ||
340 | perf_namestore_api_zone_iteration.c | ||
341 | perf_namestore_api_zone_iteration_sqlite_LDADD = \ | ||
342 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
343 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
344 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
345 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
346 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
347 | |||
348 | test_namestore_api_zone_iteration_nick_sqlite_SOURCES = \ | ||
349 | test_namestore_api_zone_iteration_nick.c | ||
350 | test_namestore_api_zone_iteration_nick_sqlite_LDADD = \ | ||
351 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
352 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
353 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
354 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
355 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
356 | |||
357 | test_namestore_api_zone_iteration_nick_postgres_SOURCES = \ | ||
358 | test_namestore_api_zone_iteration_nick.c | ||
359 | test_namestore_api_zone_iteration_nick_postgres_LDADD = \ | ||
360 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
361 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
362 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
363 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
364 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
365 | |||
366 | test_namestore_api_zone_iteration_specific_zone_sqlite_SOURCES = \ | ||
367 | test_namestore_api_zone_iteration_specific_zone.c | ||
368 | test_namestore_api_zone_iteration_specific_zone_sqlite_LDADD = \ | ||
369 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
370 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
371 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
372 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
373 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
374 | |||
375 | test_namestore_api_zone_iteration_specific_zone_postgres_SOURCES = \ | ||
376 | test_namestore_api_zone_iteration_specific_zone.c | ||
377 | test_namestore_api_zone_iteration_specific_zone_postgres_LDADD = \ | ||
378 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
379 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
380 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
381 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
382 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
383 | |||
384 | test_namestore_api_zone_iteration_stop_sqlite_SOURCES = \ | ||
385 | test_namestore_api_zone_iteration_stop.c | ||
386 | test_namestore_api_zone_iteration_stop_sqlite_LDADD = \ | ||
387 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
388 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
389 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
390 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
391 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
392 | |||
393 | test_namestore_api_zone_iteration_stop_postgres_SOURCES = \ | ||
394 | test_namestore_api_zone_iteration_stop.c | ||
395 | test_namestore_api_zone_iteration_stop_postgres_LDADD = \ | ||
396 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
397 | $(top_builddir)/src/service/identity/libgnunetidentity.la \ | ||
398 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
399 | $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \ | ||
400 | $(top_builddir)/src/service/namestore/libgnunetnamestore.la | ||
401 | |||
402 | |||
403 | EXTRA_DIST = \ | ||
404 | test_common.c \ | ||
405 | test_namestore_api.conf \ | ||
406 | test_namestore_api_postgres.conf \ | ||
407 | test_namestore_api_sqlite.conf \ | ||
408 | perf_namestore_api_postgres.conf \ | ||
409 | perf_namestore_api_sqlite.conf | ||
410 | |||
diff --git a/src/service/namestore/meson.build b/src/service/namestore/meson.build index 912b312fa..616c8ad01 100644 --- a/src/service/namestore/meson.build +++ b/src/service/namestore/meson.build | |||
@@ -55,3 +55,59 @@ executable ('gnunet-namestore-fcfsd', | |||
55 | install: true, | 55 | install: true, |
56 | install_dir: get_option('libdir')/'gnunet'/'libexec') | 56 | install_dir: get_option('libdir')/'gnunet'/'libexec') |
57 | 57 | ||
58 | |||
59 | configure_file(copy: true, | ||
60 | input: 'test_namestore_api.conf', | ||
61 | output: 'test_namestore_api.conf') | ||
62 | |||
63 | configure_file(copy: true, | ||
64 | input: 'test_namestore_api_sqlite.conf', | ||
65 | output: 'test_namestore_api_sqlite.conf') | ||
66 | |||
67 | namestoreapitestnames = [ | ||
68 | 'test_namestore_api_edit_records', | ||
69 | 'test_namestore_api_lookup_nick', | ||
70 | 'test_namestore_api_monitoring', | ||
71 | 'test_namestore_api_monitoring_existing', | ||
72 | 'test_namestore_api_remove', | ||
73 | 'test_namestore_api_remove_not_existing_record', | ||
74 | 'test_namestore_api_store', | ||
75 | 'test_namestore_api_store_update', | ||
76 | 'test_namestore_api_tx_rollback', | ||
77 | 'test_namestore_api_zone_iteration', | ||
78 | 'test_namestore_api_zone_iteration_nick', | ||
79 | 'test_namestore_api_zone_iteration_specific_zone', | ||
80 | 'test_namestore_api_zone_iteration_stop', | ||
81 | 'test_namestore_api_zone_to_name' | ||
82 | ] | ||
83 | |||
84 | foreach tn : namestoreapitestnames | ||
85 | t = executable (tn + '_sqlite', | ||
86 | [tn + '.c'], | ||
87 | dependencies: [ | ||
88 | libgnunettesting_dep, | ||
89 | libgnunetutil_dep, | ||
90 | libgnunetgnsrecord_dep, | ||
91 | libgnunetidentity_dep, | ||
92 | libgnunetnamestore_dep], | ||
93 | include_directories: [incdir, configuration_inc], | ||
94 | install: false) | ||
95 | test(tn + '_sqlite', t, workdir: meson.current_build_dir(), | ||
96 | suite: 'namestore') | ||
97 | if pq_dep.found() | ||
98 | t_pq = executable (tn + '_postgres', | ||
99 | [tn + '.c'], | ||
100 | dependencies: [ | ||
101 | libgnunettesting_dep, | ||
102 | libgnunetutil_dep, | ||
103 | libgnunetgnsrecord_dep, | ||
104 | libgnunetidentity_dep, | ||
105 | libgnunetnamestore_dep], | ||
106 | include_directories: [incdir, configuration_inc], | ||
107 | install: false) | ||
108 | test(tn + '_postgres', t, workdir: meson.current_build_dir(), | ||
109 | suite: 'namestore') | ||
110 | endif | ||
111 | endforeach | ||
112 | |||
113 | # FIXME perf tests missing | ||
diff --git a/src/plugin/namestore/perf_namestore_api_import.c b/src/service/namestore/perf_namestore_api_import.c index e56fb961c..8ffab30ea 100644 --- a/src/plugin/namestore/perf_namestore_api_import.c +++ b/src/service/namestore/perf_namestore_api_import.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_namestore_service.h" | 26 | #include "gnunet_namestore_service.h" |
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "namestore.h" | 28 | #include "../service/namestore/namestore.h" |
29 | 29 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
31 | 31 | ||
diff --git a/src/plugin/namestore/perf_namestore_api_postgres.conf b/src/service/namestore/perf_namestore_api_postgres.conf index 5e02c2df3..5e02c2df3 100644 --- a/src/plugin/namestore/perf_namestore_api_postgres.conf +++ b/src/service/namestore/perf_namestore_api_postgres.conf | |||
diff --git a/src/plugin/namestore/perf_namestore_api_sqlite.conf b/src/service/namestore/perf_namestore_api_sqlite.conf index 55c3dc812..55c3dc812 100644 --- a/src/plugin/namestore/perf_namestore_api_sqlite.conf +++ b/src/service/namestore/perf_namestore_api_sqlite.conf | |||
diff --git a/src/plugin/namestore/perf_namestore_api_zone_iteration.c b/src/service/namestore/perf_namestore_api_zone_iteration.c index e16748f5b..f96839e65 100644 --- a/src/plugin/namestore/perf_namestore_api_zone_iteration.c +++ b/src/service/namestore/perf_namestore_api_zone_iteration.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_namestore_service.h" | 26 | #include "gnunet_namestore_service.h" |
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "namestore.h" | 28 | #include "../service/namestore/namestore.h" |
29 | 29 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
31 | 31 | ||
diff --git a/src/plugin/namestore/test_common.c b/src/service/namestore/test_common.c index 4df24a7f7..4df24a7f7 100644 --- a/src/plugin/namestore/test_common.c +++ b/src/service/namestore/test_common.c | |||
diff --git a/src/plugin/namestore/test_namestore_api.conf b/src/service/namestore/test_namestore_api.conf index 1648c7cae..647cd8e20 100644 --- a/src/plugin/namestore/test_namestore_api.conf +++ b/src/service/namestore/test_namestore_api.conf | |||
@@ -1,5 +1,5 @@ | |||
1 | @INLINE@ ../../contrib/conf/gnunet/no_forcestart.conf | 1 | @INLINE@ ../../../contrib/conf/gnunet/no_forcestart.conf |
2 | @INLINE@ ../../contrib/conf/gnunet/no_autostart_above_core.conf | 2 | @INLINE@ ../../../contrib/conf/gnunet/no_autostart_above_core.conf |
3 | 3 | ||
4 | [PATHS] | 4 | [PATHS] |
5 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-namestore/ | 5 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-namestore/ |
diff --git a/src/plugin/namestore/test_namestore_api_edit_records.c b/src/service/namestore/test_namestore_api_edit_records.c index a6bce7c17..a6bce7c17 100644 --- a/src/plugin/namestore/test_namestore_api_edit_records.c +++ b/src/service/namestore/test_namestore_api_edit_records.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_lookup_nick.c b/src/service/namestore/test_namestore_api_lookup_nick.c index 21fc1ef79..21fc1ef79 100644 --- a/src/plugin/namestore/test_namestore_api_lookup_nick.c +++ b/src/service/namestore/test_namestore_api_lookup_nick.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_monitoring.c b/src/service/namestore/test_namestore_api_monitoring.c index 74dad3749..0bcdf40c5 100644 --- a/src/plugin/namestore/test_namestore_api_monitoring.c +++ b/src/service/namestore/test_namestore_api_monitoring.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "../service/namestore/namestore.h" |
28 | 28 | ||
29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
30 | 30 | ||
diff --git a/src/plugin/namestore/test_namestore_api_monitoring_existing.c b/src/service/namestore/test_namestore_api_monitoring_existing.c index fe17833c8..553bbf7d1 100644 --- a/src/plugin/namestore/test_namestore_api_monitoring_existing.c +++ b/src/service/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "../service/namestore/namestore.h" |
28 | 28 | ||
29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
30 | 30 | ||
diff --git a/src/plugin/namestore/test_namestore_api_postgres.conf b/src/service/namestore/test_namestore_api_postgres.conf index 007168280..007168280 100644 --- a/src/plugin/namestore/test_namestore_api_postgres.conf +++ b/src/service/namestore/test_namestore_api_postgres.conf | |||
diff --git a/src/plugin/namestore/test_namestore_api_remove.c b/src/service/namestore/test_namestore_api_remove.c index 1a4a7c867..1a4a7c867 100644 --- a/src/plugin/namestore/test_namestore_api_remove.c +++ b/src/service/namestore/test_namestore_api_remove.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_remove_not_existing_record.c b/src/service/namestore/test_namestore_api_remove_not_existing_record.c index 11a69bea1..11a69bea1 100644 --- a/src/plugin/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/service/namestore/test_namestore_api_remove_not_existing_record.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_sqlite.conf b/src/service/namestore/test_namestore_api_sqlite.conf index 342356247..342356247 100644 --- a/src/plugin/namestore/test_namestore_api_sqlite.conf +++ b/src/service/namestore/test_namestore_api_sqlite.conf | |||
diff --git a/src/plugin/namestore/test_namestore_api_store.c b/src/service/namestore/test_namestore_api_store.c index 22b92fbe5..22b92fbe5 100644 --- a/src/plugin/namestore/test_namestore_api_store.c +++ b/src/service/namestore/test_namestore_api_store.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_store_update.c b/src/service/namestore/test_namestore_api_store_update.c index 86495e261..86495e261 100644 --- a/src/plugin/namestore/test_namestore_api_store_update.c +++ b/src/service/namestore/test_namestore_api_store_update.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_tx_rollback.c b/src/service/namestore/test_namestore_api_tx_rollback.c index 4a701f60e..4a701f60e 100644 --- a/src/plugin/namestore/test_namestore_api_tx_rollback.c +++ b/src/service/namestore/test_namestore_api_tx_rollback.c | |||
diff --git a/src/plugin/namestore/test_namestore_api_zone_iteration.c b/src/service/namestore/test_namestore_api_zone_iteration.c index fb69fffcc..41854f21b 100644 --- a/src/plugin/namestore/test_namestore_api_zone_iteration.c +++ b/src/service/namestore/test_namestore_api_zone_iteration.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "../service/namestore/namestore.h" |
28 | 28 | ||
29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
30 | 30 | ||
diff --git a/src/plugin/namestore/test_namestore_api_zone_iteration_nick.c b/src/service/namestore/test_namestore_api_zone_iteration_nick.c index c494051d0..acd97bd6e 100644 --- a/src/plugin/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/service/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_gns_service.h" | 26 | #include "gnunet_gns_service.h" |
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "namestore.h" | 28 | #include "../service/namestore/namestore.h" |
29 | 29 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
31 | 31 | ||
diff --git a/src/plugin/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c index 02587706c..2f7fc909b 100644 --- a/src/plugin/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_namestore_service.h" | 26 | #include "gnunet_namestore_service.h" |
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "namestore.h" | 28 | #include "../service/namestore/namestore.h" |
29 | 29 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
31 | 31 | ||
diff --git a/src/plugin/namestore/test_namestore_api_zone_iteration_stop.c b/src/service/namestore/test_namestore_api_zone_iteration_stop.c index b6b0787ef..0497616de 100644 --- a/src/plugin/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/service/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "../service/namestore/namestore.h" |
28 | 28 | ||
29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
30 | 30 | ||
diff --git a/src/plugin/namestore/test_namestore_api_zone_to_name.c b/src/service/namestore/test_namestore_api_zone_to_name.c index c70eef53a..83188d230 100644 --- a/src/plugin/namestore/test_namestore_api_zone_to_name.c +++ b/src/service/namestore/test_namestore_api_zone_to_name.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "../service/namestore/namestore.h" |
28 | 28 | ||
29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | 29 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT |
30 | 30 | ||
diff --git a/src/service/util/meson.build b/src/service/util/meson.build index a7199fa4b..b7642c905 100644 --- a/src/service/util/meson.build +++ b/src/service/util/meson.build | |||
@@ -19,3 +19,16 @@ executable ('gnunet-service-resolver', | |||
19 | include_directories: [incdir, configuration_inc], | 19 | include_directories: [incdir, configuration_inc], |
20 | install: true, | 20 | install: true, |
21 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | 21 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') |
22 | |||
23 | testresolverapi = executable ('test_resolver_api', | ||
24 | ['test_resolver_api.c'], | ||
25 | dependencies: [libgnunetutil_dep], | ||
26 | include_directories: [incdir, configuration_inc], | ||
27 | install: false) | ||
28 | configure_file(copy: true, | ||
29 | input: 'test_resolver_api_data.conf', | ||
30 | output: 'test_resolver_api_data.conf') | ||
31 | |||
32 | test('test_resolver_api', testresolverapi, workdir: meson.current_build_dir(), | ||
33 | suite: 'resolver') | ||
34 | |||
diff --git a/src/service/util/test_resolver_api.c b/src/service/util/test_resolver_api.c index 5ad0c6bf3..f8a2164a2 100644 --- a/src/service/util/test_resolver_api.c +++ b/src/service/util/test_resolver_api.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
27 | #include "gnunet_resolver_service.h" | 27 | #include "gnunet_resolver_service.h" |
28 | #include "resolver.h" | 28 | #include "../lib/util/resolver.h" |
29 | 29 | ||
30 | 30 | ||
31 | static int disable_rootserver_check; | 31 | static int disable_rootserver_check; |