additional test for monitoring: check if existing records are returned
[oweals/gnunet.git] / src / namestore / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 pkgcfgdir= $(pkgdatadir)/config.d/
6
7 libexecdir= $(pkglibdir)/libexec/
8
9 pkgcfg_DATA = \
10    namestore.conf
11
12
13 if MINGW
14   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19   XLIBS = -lgcov
20 endif
21
22 if HAVE_SQLITE
23 SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
24 if HAVE_TESTING
25 SQLITE_TESTS = test_plugin_namestore_sqlite 
26 endif
27 endif
28
29 if HAVE_POSTGRES
30 # postgres doesn't even build yet; thus: experimental!
31 if HAVE_EXPERIMENTAL
32 POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
33 if HAVE_TESTING
34 POSTGRES_TESTS = test_plugin_namestore_postgres
35 endif
36 endif
37 endif
38
39 # testcases do not even build yet; thus: experimental!
40 if HAVE_EXPERIMENTAL
41
42 if HAVE_TESTING
43 TESTING_TESTS = \
44  test_namestore_api_store \
45  test_namestore_api_remove \
46  test_namestore_api_zone_iteration \
47  test_namestore_api_zone_iteration_specific_zone \
48  test_namestore_api_zone_iteration_stop \
49  test_namestore_api_monitoring \
50  test_namestore_api_monitoring_existing
51 # test_namestore_api_lookup 
52 #test_namestore_api_lookup_specific_type
53 #test_namestore_api_create 
54 #test_namestore_api_create_update
55 #test_namestore_api_remove_not_existing_record 
56 #test_namestore_api_zone_to_name  
57 endif
58
59 if HAVE_SQLITE
60 check_PROGRAMS = \
61  test_namestore_record_serialization \
62  test_namestore_api_blocks \
63  $(SQLITE_TESTS) \
64  $(POSTGRES_TESTS) \
65  $(TESTING_TESTS)
66 endif
67
68 # end of 'HAVE_EXPERIMENTAL' for testcases 
69 endif
70
71 if ENABLE_TEST_RUN
72 TESTS = $(check_PROGRAMS)
73 endif
74
75 lib_LTLIBRARIES = \
76   libgnunetnamestore.la
77
78 libgnunetnamestore_la_SOURCES = \
79   namestore_api.c \
80   namestore_api_monitor.c \
81   namestore_api_common.c \
82   namestore.h
83 libgnunetnamestore_la_LIBADD = \
84   $(top_builddir)/src/statistics/libgnunetstatistics.la \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   $(GN_LIBINTL) 
87 libgnunetnamestore_la_LDFLAGS = \
88   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
89   -version-info 0:1:0
90
91 libexec_PROGRAMS = \
92  gnunet-service-namestore 
93
94 bin_PROGRAMS = \
95  gnunet-namestore 
96
97 if HAVE_MHD
98 bin_PROGRAMS += \
99  gnunet-namestore-fcfsd
100 endif
101
102 gnunet_namestore_SOURCES = \
103  gnunet-namestore.c 
104 gnunet_namestore_LDADD = \
105   $(top_builddir)/src/util/libgnunetutil.la \
106   $(top_builddir)/src/identity/libgnunetidentity.la \
107   libgnunetnamestore.la \
108   $(GN_LIBINTL)
109 gnunet_namestore_DEPENDENCIES = \
110   $(top_builddir)/src/identity/libgnunetidentity.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   libgnunetnamestore.la
113
114
115 gnunet_namestore_fcfsd_SOURCES = \
116  gnunet-namestore-fcfsd.c 
117 gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
118   $(top_builddir)/src/util/libgnunetutil.la \
119   $(top_builddir)/src/identity/libgnunetidentity.la \
120   $(top_builddir)/src/namestore/libgnunetnamestore.la \
121   $(GN_LIBINTL)
122 gnunet_namestore_fcfsd_DEPENDENCIES = \
123   $(top_builddir)/src/util/libgnunetutil.la \
124   libgnunetnamestore.la
125
126
127
128 gnunet_service_namestore_SOURCES = \
129  gnunet-service-namestore.c
130
131 gnunet_service_namestore_LDADD = \
132   $(top_builddir)/src/statistics/libgnunetstatistics.la \
133   $(top_builddir)/src/util/libgnunetutil.la \
134   libgnunetnamestore.la \
135   $(GN_LIBINTL)
136 gnunet_service_namestore_DEPENDENCIES = \
137   $(top_builddir)/src/statistics/libgnunetstatistics.la \
138   $(top_builddir)/src/util/libgnunetutil.la \
139   libgnunetnamestore.la
140
141
142 plugin_LTLIBRARIES = \
143   $(SQLITE_PLUGIN) \
144   $(POSTGRES_PLUGIN)
145
146 libgnunet_plugin_namestore_sqlite_la_SOURCES = \
147   plugin_namestore_sqlite.c 
148 libgnunet_plugin_namestore_sqlite_la_LIBADD = \
149   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
150   $(top_builddir)/src/statistics/libgnunetstatistics.la \
151   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
152   $(LTLIBINTL)
153 libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
154  $(GN_PLUGIN_LDFLAGS)
155 libgnunet_plugin_namestore_sqlite_la_DEPENDENCIES = \
156   $(top_builddir)/src/statistics/libgnunetstatistics.la \
157   $(top_builddir)/src/util/libgnunetutil.la \
158   libgnunetnamestore.la
159
160
161 libgnunet_plugin_namestore_postgres_la_SOURCES = \
162   plugin_namestore_postgres.c 
163 libgnunet_plugin_namestore_postgres_la_LIBADD = \
164   $(top_builddir)/src/namestore/libgnunetnamestore.la  \
165   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
166   $(top_builddir)/src/statistics/libgnunetstatistics.la \
167   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
168   $(LTLIBINTL)
169 libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
170  $(GN_PLUGIN_LDFLAGS)
171 libgnunet_plugin_namestore_postgres_la_DEPENDENCIES = \
172   $(top_builddir)/src/postgres/libgnunetpostgres.la  \
173   $(top_builddir)/src/statistics/libgnunetstatistics.la \
174   $(top_builddir)/src/util/libgnunetutil.la \
175   libgnunetnamestore.la
176
177 test_namestore_api_blocks_SOURCES = \
178  test_namestore_api_blocks.c
179 test_namestore_api_blocks_LDADD = \
180   $(top_builddir)/src/util/libgnunetutil.la \
181   $(top_builddir)/src/testing/libgnunettesting.la \
182   $(top_builddir)/src/namestore/libgnunetnamestore.la
183
184 test_namestore_api_store_SOURCES = \
185  test_namestore_api_store.c
186 test_namestore_api_store_LDADD = \
187   $(top_builddir)/src/testing/libgnunettesting.la \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(top_builddir)/src/namestore/libgnunetnamestore.la
190
191 test_namestore_api_put_SOURCES = \
192  test_namestore_api_put.c
193 test_namestore_api_put_LDADD = \
194   $(top_builddir)/src/testing/libgnunettesting.la \
195   $(top_builddir)/src/util/libgnunetutil.la \
196   $(top_builddir)/src/namestore/libgnunetnamestore.la
197
198 test_namestore_api_lookup_SOURCES = \
199  test_namestore_api_lookup.c
200 test_namestore_api_lookup_LDADD = \
201   $(top_builddir)/src/testing/libgnunettesting.la \
202   $(top_builddir)/src/util/libgnunetutil.la \
203   $(top_builddir)/src/namestore/libgnunetnamestore.la
204
205 test_namestore_api_lookup_specific_type_SOURCES = \
206  test_namestore_api_lookup_specific_type.c
207 test_namestore_api_lookup_specific_type_LDADD = \
208   $(top_builddir)/src/testing/libgnunettesting.la \
209   $(top_builddir)/src/util/libgnunetutil.la \
210   $(top_builddir)/src/namestore/libgnunetnamestore.la
211
212
213 test_namestore_api_create_SOURCES = \
214  test_namestore_api_create.c
215 test_namestore_api_create_LDADD = \
216   $(top_builddir)/src/testing/libgnunettesting.la \
217   $(top_builddir)/src/util/libgnunetutil.la \
218   $(top_builddir)/src/namestore/libgnunetnamestore.la
219
220 test_namestore_api_create_update_SOURCES = \
221  test_namestore_api_create_update.c
222 test_namestore_api_create_update_LDADD = \
223   $(top_builddir)/src/testing/libgnunettesting.la \
224   $(top_builddir)/src/util/libgnunetutil.la \
225   $(top_builddir)/src/namestore/libgnunetnamestore.la
226
227
228 test_namestore_api_remove_SOURCES = \
229  test_namestore_api_remove.c
230 test_namestore_api_remove_LDADD = \
231   $(top_builddir)/src/testing/libgnunettesting.la \
232   $(top_builddir)/src/util/libgnunetutil.la \
233   $(top_builddir)/src/namestore/libgnunetnamestore.la
234
235 test_namestore_api_remove_not_existing_record_SOURCES = \
236  test_namestore_api_remove_not_existing_record.c
237 test_namestore_api_remove_not_existing_record_LDADD = \
238   $(top_builddir)/src/testing/libgnunettesting.la \
239   $(top_builddir)/src/util/libgnunetutil.la \
240   $(top_builddir)/src/namestore/libgnunetnamestore.la
241
242 test_namestore_api_zone_to_name_SOURCES = \
243  test_namestore_api_zone_to_name.c
244 test_namestore_api_zone_to_name_LDADD = \
245   $(top_builddir)/src/testing/libgnunettesting.la \
246   $(top_builddir)/src/util/libgnunetutil.la \
247   $(top_builddir)/src/namestore/libgnunetnamestore.la
248
249 test_namestore_api_monitoring_SOURCES = \
250  test_namestore_api_monitoring.c
251 test_namestore_api_monitoring_LDADD = \
252   $(top_builddir)/src/testing/libgnunettesting.la \
253   $(top_builddir)/src/namestore/libgnunetnamestore.la \
254   $(top_builddir)/src/util/libgnunetutil.la 
255   
256 test_namestore_api_monitoring_existing_SOURCES = \
257  test_namestore_api_monitoring_existing.c
258 test_namestore_api_monitoring_existing_LDADD = \
259   $(top_builddir)/src/testing/libgnunettesting.la \
260   $(top_builddir)/src/namestore/libgnunetnamestore.la \
261   $(top_builddir)/src/util/libgnunetutil.la 
262  
263 test_namestore_api_zone_iteration_SOURCES = \
264  test_namestore_api_zone_iteration.c
265 test_namestore_api_zone_iteration_LDADD = \
266   $(top_builddir)/src/testing/libgnunettesting.la \
267   $(top_builddir)/src/util/libgnunetutil.la \
268   $(top_builddir)/src/namestore/libgnunetnamestore.la  
269
270 test_namestore_api_zone_iteration_specific_zone_SOURCES = \
271  test_namestore_api_zone_iteration_specific_zone.c
272 test_namestore_api_zone_iteration_specific_zone_LDADD = \
273   $(top_builddir)/src/testing/libgnunettesting.la \
274   $(top_builddir)/src/util/libgnunetutil.la \
275   $(top_builddir)/src/namestore/libgnunetnamestore.la  
276
277 test_namestore_api_zone_iteration_stop_SOURCES = \
278  test_namestore_api_zone_iteration_stop.c
279 test_namestore_api_zone_iteration_stop_LDADD = \
280   $(top_builddir)/src/testing/libgnunettesting.la \
281   $(top_builddir)/src/util/libgnunetutil.la \
282   $(top_builddir)/src/namestore/libgnunetnamestore.la    
283
284 test_namestore_record_serialization_SOURCES = \
285  test_namestore_record_serialization.c
286 test_namestore_record_serialization_LDADD = \
287   $(top_builddir)/src/testing/libgnunettesting.la \
288   $(top_builddir)/src/util/libgnunetutil.la \
289   $(top_builddir)/src/namestore/libgnunetnamestore.la  
290
291 EXTRA_DIST = \
292   test_namestore_api.conf \
293   test_plugin_namestore_sqlite.conf \
294   test_plugin_namestore_postgres.conf \
295   test_hostkey \
296   zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \
297   zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \
298   zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \
299   zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
300
301
302
303 test_plugin_namestore_sqlite_SOURCES = \
304  test_plugin_namestore.c
305 test_plugin_namestore_sqlite_LDADD = \
306  $(top_builddir)/src/testing/libgnunettesting.la \
307  $(top_builddir)/src/util/libgnunetutil.la  
308
309 test_plugin_namestore_postgres_SOURCES = \
310  test_plugin_namestore.c
311 test_plugin_namestore_postgres_LDADD = \
312  $(top_builddir)/src/testing/libgnunettesting.la \
313  $(top_builddir)/src/util/libgnunetutil.la