Updated French translation
[profile/ivi/rygel.git] / tests / Makefile.am
1 include $(top_srcdir)/common.am
2
3 check_PROGRAMS = rygel-http-item-uri-test \
4                  rygel-http-response-test \
5                  rygel-http-byte-seek-test \
6                  rygel-http-time-seek-test \
7                  rygel-http-get-test \
8                  rygel-album-art-spec-test \
9                  rygel-http-post-test \
10                  rygel-searchable-container-test \
11                  rygel-object-creator-test \
12                  rygel-user-config-test \
13                  rygel-regression \
14                  rygel-media-engine-test
15
16 TESTS = $(check_PROGRAMS)
17
18 EXTRA_DIST = $(srcdir)/data/test-data.dat
19
20 # Define the most commonly-used flags,
21 # to avoid repetition:
22 test_valaflags = \
23         $(TEST_DEPS_VALAFLAGS) \
24         $(RYGEL_COMMON_VALAFLAGS)
25 test_cflags = \
26         $(TEST_DEPS_CFLAGS) \
27         $(RYGEL_COMMON_DEFINES_CFLAGS)
28 test_libs = \
29         $(TEST_DEPS_LIBS) \
30         $(COVERAGE_LIBS)
31
32 # This is for tests that link to librygel-server,
33 # instead of compiling its source files directly:
34 test_server_valaflags = \
35         $(test_valaflags) \
36         $(RYGEL_COMMON_LIBRYGEL_SERVER_VALAFLAGS)
37 test_server_cflags = \
38         $(test_cflags) \
39         $(LIBRYGEL_SERVER_DEPS_CFLAGS) \
40         $(RYGEL_COMMON_LIBRYGEL_SERVER_CFLAGS)
41 test_server_libs = \
42         $(test_libs) \
43         $(LIBRYGEL_SERVER_DEPS_LIBS) \
44         $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS)
45         
46 # Note that the non-test sources here are symlinked from their
47 # various source directories.
48 # TODO: Mention their relative paths instead, to make this clearer?
49 rygel_http_item_uri_test_SOURCES = rygel-http-item-uri-test.vala \
50                                    rygel-http-item-uri.vala
51 rygel_http_item_uri_test_VALAFLAGS = \
52         $(test_valaflags)
53 rygel_http_item_uri_test_CFLAGS =  \
54         $(test_cflags)
55 rygel_http_item_uri_test_LDADD = \
56         $(test_libs)
57
58 rygel_http_response_test_SOURCES = rygel-http-response-test.vala \
59                                    rygel-http-response.vala \
60                                    rygel-state-machine_http-response.vala \
61                                    rygel-data-source_http-response.vala \
62                                    rygel-data-sink_http-response.vala
63 rygel_http_response_test_VALAFLAGS = \
64         $(test_valaflags)
65 rygel_http_response_test_CFLAGS =  \
66         $(test_cflags)
67 rygel_http_response_test_LDADD = \
68         $(test_libs)
69
70 rygel_http_byte_seek_test_SOURCES = rygel-http-byte-seek-test.vala \
71                                     rygel-http-byte-seek.vala \
72                                     rygel-http-seek.vala
73 rygel_http_byte_seek_test_VALAFLAGS = \
74         $(test_valaflags)
75 rygel_http_byte_seek_test_CFLAGS =  \
76         $(test_cflags)
77 rygel_http_byte_seek_test_LDADD = $(test_libs)
78
79 rygel_http_time_seek_test_SOURCES = rygel-http-time-seek-test.vala \
80                                     rygel-http-time-seek.vala \
81                                     rygel-http-seek_time-seek.vala
82 rygel_http_time_seek_test_VALAFLAGS = \
83         $(test_valaflags)
84 rygel_http_time_seek_test_CFLAGS =  \
85         $(test_cflags)
86 rygel_http_time_seek_test_LDADD = \
87         $(test_libs)
88
89 rygel_http_get_test_SOURCES = rygel-http-get-test.vala \
90                               rygel-http-get.vala \
91                               rygel-http-request_http-get.vala \
92                               rygel-http-item-uri_http-get.vala \
93                               rygel-state-machine_http-get.vala \
94                               rygel-http-time-seek_http-get.vala \
95                               rygel-http-byte-seek_http-get.vala \
96                               rygel-http-seek_http-get.vala
97 rygel_http_get_test_VALAFLAGS = \
98         $(test_valaflags)
99 rygel_http_get_test_CFLAGS =  \
100         $(test_cflags)
101 rygel_http_get_test_LDADD = \
102         $(test_libs)
103
104 rygel_http_post_test_SOURCES = rygel-http-post-test.vala \
105                                rygel-http-post.vala \
106                                rygel-http-request_http-post.vala \
107                                rygel-http-item-uri_http-post.vala \
108                                rygel-state-machine_http-post.vala
109 rygel_http_post_test_VALAFLAGS = $(test_valaflags) \
110         --pkg gupnp-av-1.0
111 rygel_http_post_test_CFLAGS =  \
112         $(test_cflags)
113 rygel_http_post_test_LDADD = \
114         $(test_libs)
115
116 rygel_album_art_spec_test_SOURCES = rygel-album-art-spec-test.vala \
117                                rygel-media-art-store.vala \
118                                    rygel-thumbnail.vala \
119                                    rygel-icon-info.vala
120 rygel_album_art_spec_test_VALAFLAGS = $(test_valaflags) \
121         --pkg gupnp-av-1.0
122 rygel_album_art_spec_test_CFLAGS =  \
123         $(test_cflags)
124 rygel_album_art_spec_test_LDADD = \
125         $(test_libs)
126
127 rygel_searchable_container_test_SOURCES = \
128         rygel-searchable-container.vala \
129         rygel-searchable-container-test.vala
130 rygel_searchable_container_test_VALAFLAGS = \
131         $(test_valaflags) \
132         --pkg gupnp-av-1.0
133 rygel_searchable_container_test_CFLAGS =  \
134         $(test_cflags)
135 rygel_searchable_container_test_LDADD = \
136         $(test_libs)
137
138 rygel_object_creator_test_SOURCES = rygel-object-creator-test.vala \
139                                   rygel-object-creator.vala \
140                                   rygel-data-source.vala \
141                                   rygel-dlna-profile.vala \
142                                   rygel-http-seek_object-creator.vala \
143                                   rygel-state-machine_object-creator.vala \
144                                   rygel-relational-expression.vala \
145                                   rygel-logical-expression.vala \
146                                   rygel-search-expression.vala \
147                                   rygel-search-criteria-parser.vala \
148                                   rygel-serializer_object-creator.vala \
149                                   rygel-m3u-playlist_object-creator.vala
150 rygel_object_creator_test_VALAFLAGS = \
151         $(test_valaflags) \
152         --pkg uuid
153 rygel_object_creator_test_CFLAGS =  \
154         $(test_cflags)
155 rygel_object_creator_test_LDADD = \
156         $(test_libs)
157
158 rygel_user_config_test_SOURCES = rygel-configuration.vala \
159                                  rygel-user-config.vala \
160                                  rygel-user-config-test.vala
161 rygel_user_config_test_VALAFLAGS = \
162         $(test_valaflags)
163 rygel_user_config_test_CFLAGS =  \
164         $(test_cflags) \
165         -DSYS_CONFIG_DIR='"$(sysconfigdir)"'
166 rygel_user_config_test_LDADD = \
167         $(test_libs)
168
169 rygel_regression_SOURCES = \
170         rygel-regression.vala
171 rygel_regression_VALAFLAGS = \
172         $(test_server_valaflags)
173 rygel_regression_CFLAGS = \
174         $(test_server_cflags)
175 rygel_regression_LDADD = \
176         $(test_server_libs)
177
178 rygel_media_engine_test_SOURCES = \
179         rygel-media-engine-test.vala
180 rygel_media_engine_test_VALAFLAGS = \
181         $(test_server_valaflags)
182 rygel_media_engine_test_CFLAGS = \
183         $(test_server_cflags) \
184         -DTEST_DATA_FOLDER='"$(abs_srcdir)/data"' \
185         -DTEST_ENGINE_PATH='"$(abs_top_builddir)/src/media-engines"' \
186         -DBUILT_ENGINES='"@BUILT_ENGINES@"'
187 rygel_media_engine_test_LDADD = \
188         $(test_server_libs)
189
190 if HAVE_GSTREAMER
191 check_PROGRAMS += \
192         rygel-playbin-renderer-test \
193         rygel-environment-test
194
195 test_librygel_renderer_gst_valaflags = \
196         $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_VALAFLAGS) \
197         $(RYGEL_COMMON_VALAFLAGS)
198 test_librygel_renderer_gst_cflags = \
199         $(test_cflags) \
200         $(LIBRYGEL_RENDERER_GST_DEPS_CFLAGS) \
201         $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_CFLAGS)
202 test_librygel_renderer_gst_libs = \
203         $(test_libs) \
204         $(LIBRYGEL_RENDERER_GST_DEPS_LIBS) \
205         $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_LIBS)
206         
207 rygel_playbin_renderer_test_SOURCES = rygel-playbin-renderer-test.vala
208 rygel_playbin_renderer_test_VALAFLAGS = \
209         --enable-experimental \
210         $(test_librygel_renderer_gst_valaflags)
211 rygel_playbin_renderer_test_CFLAGS = \
212         $(test_librygel_renderer_gst_cflags)
213 rygel_playbin_renderer_test_LDADD = \
214         $(test_librygel_renderer_gst_libs)
215
216 rygel_environment_test_SOURCES = rygel-environment-test.vala
217 rygel_environment_test_VALAFLAGS = \
218         --enable-experimental \
219         $(test_librygel_renderer_gst_valaflags)
220 rygel_environment_test_CFLAGS = \
221         $(test_librygel_renderer_gst_cflags)
222 rygel_environment_test_LDADD = \
223         $(test_librygel_renderer_gst_libs)
224
225 endif
226
227 if BUILD_MEDIA_EXPORT_PLUGIN
228 check_PROGRAMS += plugins/media-export/regression
229
230 plugins_media_export_regression_SOURCES = \
231         $(top_srcdir)/src/librygel-core/rygel-core-2.2.vapi \
232         $(top_srcdir)/src/librygel-server/rygel-server-2.2.vapi \
233         $(top_srcdir)/src/plugins/media-export/rygel-media-export.vapi \
234         plugins/media-export/regression.vala
235 plugins_media_export_regression_CFLAGS = \
236         $(test_cflags) \
237         $(COLLATION_CFLAGS) \
238         $(RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_CFLAGS) \
239         $(RYGEL_COMMON_LIBRYGEL_SERVER_CFLAGS) \
240         -I$(top_srcdir)/src/plugins/media-export
241 plugins_media_export_regression_LDADD = \
242         $(test_libs) \
243         $(COLLATION_LIBS) \
244         $(RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_LIBS) \
245         $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS) \
246         $(top_builddir)/src/plugins/media-export/librygel-media-export.la
247 plugins_media_export_regression_VALAFLAGS = \
248         $(test_valaflags) \
249         --enable-experimental \
250         $(RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS)
251 endif
252
253
254 if ALWAYS_TEST
255 all-local: check
256 endif
257
258 if ENABLE_COVERAGE
259 coverage: check
260         $(LCOV) --directory $(srcdir) --capture \
261                 --output-file $(top_builddir)/rygel.info
262         $(LCOV) --directory $(srcdir) --output-file $(top_builddir)/rygel.info \
263                 --remove $(top_builddir)/rygel.info "*.c" "*.h" "*.vapi"
264         rm -rf $(top_builddir)/coverage
265         $(mkdir_p) $(top_builddir)/coverage
266         $(GENHTML) --title "@PACKAGE_STRING@" \
267                 --output-directory $(top_builddir)/coverage \
268                 $(top_builddir)/rygel.info
269 endif