tests: export symbols of parser tests helper lib and make it static

And only make the tests that use it link against the helper lib.
This commit is contained in:
Tim-Philipp Müller 2017-08-10 09:07:17 +01:00
parent b7b7948e5f
commit dea349d9ba
2 changed files with 28 additions and 20 deletions

View file

@ -52,19 +52,19 @@ typedef GstElement* (*ElementSetup) (const gchar * desc);
/* context state variables; to be set by test using this helper */
/* mandatory */
extern const gchar *ctx_factory;
extern GstStaticPadTemplate *ctx_sink_template;
extern GstStaticPadTemplate *ctx_src_template;
GST_EXPORT const gchar *ctx_factory;
GST_EXPORT GstStaticPadTemplate *ctx_sink_template;
GST_EXPORT GstStaticPadTemplate *ctx_src_template;
/* optional */
extern GstCaps *ctx_input_caps;
extern GstCaps *ctx_output_caps;
extern guint ctx_discard;
extern datablob ctx_headers[MAX_HEADERS];
extern gboolean ctx_no_metadata;
GST_EXPORT GstCaps *ctx_input_caps;
GST_EXPORT GstCaps *ctx_output_caps;
GST_EXPORT guint ctx_discard;
GST_EXPORT datablob ctx_headers[MAX_HEADERS];
GST_EXPORT gboolean ctx_no_metadata;
extern VerifyBuffer ctx_verify_buffer;
extern ElementSetup ctx_setup;
extern gboolean ctx_frame_generated;
GST_EXPORT VerifyBuffer ctx_verify_buffer;
GST_EXPORT ElementSetup ctx_setup;
GST_EXPORT gboolean ctx_frame_generated;
/* no refs taken/kept, all up to caller */
typedef struct
@ -97,22 +97,31 @@ typedef struct
gboolean no_metadata;
} GstParserTest;
GST_EXPORT
void gst_parser_test_init (GstParserTest * ptest, guint8 * data, guint size, guint num);
GST_EXPORT
void gst_parser_test_run (GstParserTest * test, GstCaps ** out_caps);
GST_EXPORT
void gst_parser_test_normal (guint8 *data, guint size);
GST_EXPORT
void gst_parser_test_drain_single (guint8 *data, guint size);
GST_EXPORT
void gst_parser_test_drain_garbage (guint8 *data, guint size, guint8 *garbage, guint gsize);
GST_EXPORT
void gst_parser_test_split (guint8 *data, guint size);
GST_EXPORT
void gst_parser_test_skip_garbage (guint8 *data, guint size, guint8 *garbage, guint gsize);
GST_EXPORT
void gst_parser_test_output_caps (guint8 *data, guint size, const gchar * input_caps,
const gchar * output_caps);
GST_EXPORT
GstCaps *gst_parser_test_get_output_caps (guint8 *data, guint size, const gchar * input_caps);

View file

@ -1,7 +1,7 @@
have_registry = true # FIXME not get_option('disable_registry')
libparser = library('parser',
'elements/parser.c', 'elements/parser.h',
libparser = static_library('parser',
'elements/parser.c',
install : false,
dependencies : [gst_dep, gstcheck_dep],
)
@ -32,20 +32,20 @@ base_tests = [
[['elements/faad.c'], not faad_dep.found() or not have_faad_2_7, [faad_dep]],
[['elements/gdpdepay.c']],
[['elements/gdppay.c']],
[['elements/h263parse.c']],
[['elements/h264parse.c']],
[['elements/h263parse.c'], false, [libparser_dep]],
[['elements/h264parse.c'], false, [libparser_dep]],
[['elements/id3mux.c']],
[['elements/jifmux.c'], not exif_dep.found(), [exif_dep]],
[['elements/jpegparse.c']],
[['elements/kate.c'], not kate_dep.found(), [kate_dep]],
[['elements/mpeg4videoparse.c']],
[['elements/mpeg4videoparse.c'], false, [libparser_dep]],
[['elements/mpegtsmux.c']],
[['elements/mpegvideoparse.c']],
[['elements/mpegvideoparse.c'], false, [libparser_dep]],
[['elements/mssdemux.c', 'elements/test_http_src.c', 'elements/adaptive_demux_engine.c', 'elements/adaptive_demux_common.c'], not xml28_dep.found(), [xml28_dep]],
[['elements/mxfdemux.c']],
[['elements/mxfmux.c']],
[['elements/netsim.c']],
[['elements/pcapparse.c']],
[['elements/pcapparse.c'], false, [libparser_dep]],
[['elements/pnm.c']],
[['elements/schroenc.c'], not schro_dep.found(), [schro_dep]],
[['elements/shm.c'], not shm_enabled, shm_deps],
@ -71,8 +71,7 @@ test_deps = [gst_dep, gstapp_dep, gstbase_dep,
gstbasecamerabin_dep, gstphotography_dep,
gstpbutils_dep, gstcontroller_dep, gstaudio_dep,
gstvideo_dep, gstrtp_dep, gsturidownloader_dep,
gstcheck_dep, gio_dep, glib_dep, libparser_dep,
gsttag_dep]
gstcheck_dep, gio_dep, glib_dep, gsttag_dep]
pluginsdirs = [ ]