1 include $(top_srcdir)/common.am
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 \
8 rygel-album-art-spec-test \
10 rygel-searchable-container-test \
11 rygel-object-creator-test \
12 rygel-user-config-test \
14 rygel-media-engine-test
16 TESTS = $(check_PROGRAMS)
18 EXTRA_DIST = $(srcdir)/data/test-data.dat
20 # Define the most commonly-used flags,
21 # to avoid repetition:
23 $(TEST_DEPS_VALAFLAGS) \
24 $(RYGEL_COMMON_VALAFLAGS)
27 $(RYGEL_COMMON_DEFINES_CFLAGS)
32 # This is for tests that link to librygel-server,
33 # instead of compiling its source files directly:
34 test_server_valaflags = \
36 $(RYGEL_COMMON_LIBRYGEL_SERVER_VALAFLAGS)
37 test_server_cflags = \
39 $(LIBRYGEL_SERVER_DEPS_CFLAGS) \
40 $(RYGEL_COMMON_LIBRYGEL_SERVER_CFLAGS)
43 $(LIBRYGEL_SERVER_DEPS_LIBS) \
44 $(RYGEL_COMMON_LIBRYGEL_SERVER_LIBS)
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 = \
53 rygel_http_item_uri_test_CFLAGS = \
55 rygel_http_item_uri_test_LDADD = \
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 = \
65 rygel_http_response_test_CFLAGS = \
67 rygel_http_response_test_LDADD = \
70 rygel_http_byte_seek_test_SOURCES = rygel-http-byte-seek-test.vala \
71 rygel-http-byte-seek.vala \
73 rygel_http_byte_seek_test_VALAFLAGS = \
75 rygel_http_byte_seek_test_CFLAGS = \
77 rygel_http_byte_seek_test_LDADD = $(test_libs)
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 = \
84 rygel_http_time_seek_test_CFLAGS = \
86 rygel_http_time_seek_test_LDADD = \
89 rygel_http_get_test_SOURCES = rygel-http-get-test.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 = \
99 rygel_http_get_test_CFLAGS = \
101 rygel_http_get_test_LDADD = \
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) \
111 rygel_http_post_test_CFLAGS = \
113 rygel_http_post_test_LDADD = \
116 rygel_album_art_spec_test_SOURCES = rygel-album-art-spec-test.vala \
117 rygel-media-art-store.vala \
118 rygel-thumbnail.vala \
120 rygel_album_art_spec_test_VALAFLAGS = $(test_valaflags) \
122 rygel_album_art_spec_test_CFLAGS = \
124 rygel_album_art_spec_test_LDADD = \
127 rygel_searchable_container_test_SOURCES = \
128 rygel-searchable-container.vala \
129 rygel-searchable-container-test.vala
130 rygel_searchable_container_test_VALAFLAGS = \
133 rygel_searchable_container_test_CFLAGS = \
135 rygel_searchable_container_test_LDADD = \
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 = \
153 rygel_object_creator_test_CFLAGS = \
155 rygel_object_creator_test_LDADD = \
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 = \
163 rygel_user_config_test_CFLAGS = \
165 -DSYS_CONFIG_DIR='"$(sysconfigdir)"'
166 rygel_user_config_test_LDADD = \
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 = \
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 = \
192 rygel-playbin-renderer-test \
193 rygel-environment-test
195 test_librygel_renderer_gst_valaflags = \
196 $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_VALAFLAGS) \
197 $(RYGEL_COMMON_VALAFLAGS)
198 test_librygel_renderer_gst_cflags = \
200 $(LIBRYGEL_RENDERER_GST_DEPS_CFLAGS) \
201 $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_CFLAGS)
202 test_librygel_renderer_gst_libs = \
204 $(LIBRYGEL_RENDERER_GST_DEPS_LIBS) \
205 $(RYGEL_COMMON_LIBRYGEL_RENDERER_GST_LIBS)
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)
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)
227 if BUILD_MEDIA_EXPORT_PLUGIN
228 check_PROGRAMS += plugins/media-export/regression
230 plugins_media_export_regression_SOURCES = \
231 $(top_srcdir)/src/librygel-core/rygel-core-2.0.vapi \
232 $(top_srcdir)/src/librygel-server/rygel-server-2.0.vapi \
233 $(top_srcdir)/src/plugins/media-export/rygel-media-export.vapi \
234 plugins/media-export/regression.vala
235 plugins_media_export_regression_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 = \
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 = \
249 --enable-experimental \
250 $(RYGEL_PLUGIN_MEDIA_EXPORT_DEPS_VALAFLAGS)
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