$(REGISTRY_ENVIRONMENT) \
GST_PLUGIN_SYSTEM_PATH= \
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \
- GST_TEST_FILES_PATH=$(TEST_FILES_DIRECTORY) \
STATE_IGNORE_ELEMENTS="aasink autoaudiosrc autoaudiosink autovideosrc autovideosink cacasink cairotextoverlay gconfaudiosrc gconfvideosrc gconfaudiosink gconfvideosink halaudiosrc halaudiosink v4l2src osssrc osssink pulsesink pulsesrc pulsemixer"
-EXTRA_DIST = test-cert.pem test-key.pem audiotestsrc.flac
-
# ths core dumps of some machines have PIDs appended
CLEANFILES = core.* test-registry.*
noinst_PROGRAMS = \
elements/autodetect
-AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) $(GST_OPTION_CFLAGS)
+AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
+ $(GST_OPTION_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\""
LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
# valgrind testing
elements_interleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
elements_interleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
-elements_souphttpsrc_CFLAGS = -DCHECKDATA_DIR="$(srcdir)" $(SOUP_CFLAGS) $(AM_CFLAGS)
+elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS)
elements_souphttpsrc_LDADD = $(SOUP_LIBS) $(LDADD)
elements_sunaudio_CFLAGS = \
GstMessage *msg;
GstElement *src, *sep, *sink, *id3demux, *pipeline;
GstBus *bus;
- const gchar *dir;
gchar *path;
pipeline = gst_pipeline_new ("pipeline");
/* can't link id3demux and sink yet, do that later */
g_signal_connect (id3demux, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
- dir = g_getenv ("GST_TEST_FILES_PATH");
- fail_unless (dir != NULL, "GST_TEST_FILES_PATH environment variable not set");
-
- path = g_build_filename (dir, file, NULL);
+ path = g_build_filename (GST_TEST_FILES_PATH, file, NULL);
GST_LOG ("reading file '%s'", path);
g_object_set (src, "location", path, NULL);
SoupServer *server, *ssl_server;
guint port = SOUP_ADDRESS_ANY_PORT;
guint ssl_port = SOUP_ADDRESS_ANY_PORT;
- const char *ssl_cert_file = G_STRINGIFY (CHECKDATA_DIR) "/test-cert.pem";
- const char *ssl_key_file = G_STRINGIFY (CHECKDATA_DIR) "/test-key.pem";
+ const char *ssl_cert_file = GST_TEST_FILES_PATH "/test-cert.pem";
+ const char *ssl_key_file = GST_TEST_FILES_PATH "/test-key.pem";
static int server_running = 0;
SoupAuthDomain *domain = NULL;
*/
#include <gst/check/gstcheck.h>
+#include <glib/gstdio.h>
static guint16
buffer_get_first_sample (GstBuffer * buf)
guint16 first_sample = 0;
guint size = 0;
+ fail_unless_equals_int (g_chdir (GST_TEST_FILES_PATH), 0);
+
pipeline = gst_parse_launch ("filesrc location=audiotestsrc.flac"
" ! flacdec ! appsink name=sink", NULL);
fail_unless (pipeline != NULL);
gboolean result;
guint size = 0;
+ fail_unless_equals_int (g_chdir (GST_TEST_FILES_PATH), 0);
+
pipeline = gst_parse_launch ("filesrc location=audiotestsrc.flac"
" ! flacdec ! appsink name=sink", NULL);
fail_unless (pipeline != NULL);
guint size = 0;
guint16 first_sample = 0;
+ fail_unless_equals_int (g_chdir (GST_TEST_FILES_PATH), 0);
+
pipeline = gst_parse_launch ("filesrc location=audiotestsrc.flac"
" ! flacdec ! appsink name=sink", NULL);
fail_unless (pipeline != NULL);
GST_END_TEST;
-Suite *
+static Suite *
flacdec_suite (void)
{
Suite *s = suite_create ("flacdec");
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = flacdec_suite ();
-
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (flacdec);
EXTRA_DIST = \
+ audiotestsrc.flac \
id3-407349-1.tag \
id3-407349-2.tag \
id3-447000-wcop.tag \
- id3-577468-unsynced-tag.tag
+ id3-577468-unsynced-tag.tag \
+ test-cert.pem \
+ test-key.pem