From c014c4a621e1119ef8e2ca564de97878529b7197 Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 15 May 2009 17:11:27 +0100 Subject: checks: move files required by unit tests into tests/files and make sure they're disted Move unit test data into the directory where it belongs and make in particular the flacdec unit test cd into the directory with the test files instead of making assumptions about the current working directory in that unit test. As a side effect of movng those files, there's only one EXTRA_DIST in tests/check/Makefile.am now, which is likely to work better than having two. Hopefully fixes #582753. --- tests/check/elements/id3demux.c | 6 +----- tests/check/elements/souphttpsrc.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/check/elements') diff --git a/tests/check/elements/id3demux.c b/tests/check/elements/id3demux.c index a3eb77b4..ef1d4538 100644 --- a/tests/check/elements/id3demux.c +++ b/tests/check/elements/id3demux.c @@ -59,7 +59,6 @@ read_tags_from_file (const gchar * file, gboolean push_mode) GstMessage *msg; GstElement *src, *sep, *sink, *id3demux, *pipeline; GstBus *bus; - const gchar *dir; gchar *path; pipeline = gst_pipeline_new ("pipeline"); @@ -96,10 +95,7 @@ read_tags_from_file (const gchar * file, gboolean push_mode) /* 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); diff --git a/tests/check/elements/souphttpsrc.c b/tests/check/elements/souphttpsrc.c index 01123699..3c6f5199 100644 --- a/tests/check/elements/souphttpsrc.c +++ b/tests/check/elements/souphttpsrc.c @@ -563,8 +563,8 @@ run_server (guint * http_port, guint * https_port) 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; -- cgit