From 6710452e441eec623e09d12c89252920159e6f6d Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 28 Nov 2005 10:07:38 +0000 Subject: [PATCH] check/: Use a cmdline define to specify the location of a file to use for testing, to avoid breaking distcheck. Original commit message from CVS: * check/Makefile.am: * check/elements/fdsrc.c: (GST_START_TEST): Use a cmdline define to specify the location of a file to use for testing, to avoid breaking distcheck. --- ChangeLog | 7 +++++++ check/Makefile.am | 2 ++ check/elements/fdsrc.c | 5 ++++- tests/check/Makefile.am | 2 ++ tests/check/elements/fdsrc.c | 5 ++++- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e48577625..21b38a0b43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-28 Jan Schmidt + + * check/Makefile.am: + * check/elements/fdsrc.c: (GST_START_TEST): + Use a cmdline define to specify the location of a file to use for + testing, to avoid breaking distcheck. + 2005-11-28 Andy Wingo * gst/gstpad.c (fixate_value): Use array functions for arrays. diff --git a/check/Makefile.am b/check/Makefile.am index ec0930a9f5..dd11510b8c 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -76,6 +76,8 @@ gst_libs_gdp_SOURCES = \ $(top_srcdir)/libs/gst/dataprotocol/dataprotocol.c gst_libs_gdp_CFLAGS = $(AM_CFLAGS) +elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(CHECK_CFLAGS) -DTESTFILE=\"$(top_builddir)/configure.ac\" + gst_libs_controller_LDADD = \ $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_MAJORMINOR@.la \ $(LDADD) diff --git a/check/elements/fdsrc.c b/check/elements/fdsrc.c index 65e1b9f3f8..ef748fc96f 100644 --- a/check/elements/fdsrc.c +++ b/check/elements/fdsrc.c @@ -150,7 +150,10 @@ GST_START_TEST (test_seeking) GstQuery *seeking_query; gboolean seekable; - fail_if ((in_fd = open ("elements/fdsrc.c", O_RDONLY)) < 0); +#ifndef TESTFILE +#error TESTFILE not defined +#endif + fail_if ((in_fd = open (TESTFILE, O_RDONLY)) < 0); src = setup_fdsrc (); g_object_set (G_OBJECT (src), "fd", in_fd, NULL); diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index ec0930a9f5..dd11510b8c 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -76,6 +76,8 @@ gst_libs_gdp_SOURCES = \ $(top_srcdir)/libs/gst/dataprotocol/dataprotocol.c gst_libs_gdp_CFLAGS = $(AM_CFLAGS) +elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(CHECK_CFLAGS) -DTESTFILE=\"$(top_builddir)/configure.ac\" + gst_libs_controller_LDADD = \ $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_MAJORMINOR@.la \ $(LDADD) diff --git a/tests/check/elements/fdsrc.c b/tests/check/elements/fdsrc.c index 65e1b9f3f8..ef748fc96f 100644 --- a/tests/check/elements/fdsrc.c +++ b/tests/check/elements/fdsrc.c @@ -150,7 +150,10 @@ GST_START_TEST (test_seeking) GstQuery *seeking_query; gboolean seekable; - fail_if ((in_fd = open ("elements/fdsrc.c", O_RDONLY)) < 0); +#ifndef TESTFILE +#error TESTFILE not defined +#endif + fail_if ((in_fd = open (TESTFILE, O_RDONLY)) < 0); src = setup_fdsrc (); g_object_set (G_OBJECT (src), "fd", in_fd, NULL);