[farsight2/master] tests: Put get_fullpath into the generic testutils file
Olivier Crête
olivier.crete at collabora.co.uk
Tue Jul 14 09:51:01 PDT 2009
---
tests/check/Makefile.am | 8 ++++++++
tests/check/base/fscodec.c | 10 +---------
tests/check/testutils.c | 9 +++++++++
tests/check/testutils.h | 2 ++
tests/check/utils/binadded.c | 1 -
5 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 05d1094..ffc36ca 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -64,6 +64,12 @@ LDADD = \
$(GST_CHECK_LIBS) \
$(GST_LIBS)
+base_fscodec_SOURCES = \
+ testutils.c \
+ testutils.h \
+ base/fscodec.c
+
+
transmitter_rawudp_CFLAGS = $(AM_CFLAGS) $(GUPNP_CFLAGS) $(NICE_CFLAGS)
transmitter_rawudp_LDADD = $(LDADD) \
$(GUPNP_LIBS) \
@@ -127,6 +133,8 @@ msn_conference_SOURCES = \
utils_binadded_CFLAGS = $(AM_CFLAGS)
utils_binadded_SOURCES = \
+ testutils.c \
+ testutils.h \
utils/binadded.c
elements_rtcpfilter_CFLAGS = $(AM_CFLAGS)
diff --git a/tests/check/base/fscodec.c b/tests/check/base/fscodec.c
index 26b374d..a31c19d 100644
--- a/tests/check/base/fscodec.c
+++ b/tests/check/base/fscodec.c
@@ -25,6 +25,7 @@
#include <gst/check/gstcheck.h>
#include <gst/farsight/fs-codec.h>
+#include "testutils.h"
GST_START_TEST (test_fscodec_new)
{
@@ -198,15 +199,6 @@ GST_START_TEST (test_fscodec_null)
}
GST_END_TEST;
-static gchar *
-get_fullpath (const gchar *filename)
-{
- if (g_getenv ("SRCDIR"))
- return g_strdup_printf ("%s/%s", g_getenv ("SRCDIR"), filename);
- else
- return g_strdup (filename);
-}
-
GST_START_TEST (test_fscodec_keyfile)
{
GList *codecs = NULL;
diff --git a/tests/check/testutils.c b/tests/check/testutils.c
index c41cc62..93d6143 100644
--- a/tests/check/testutils.c
+++ b/tests/check/testutils.c
@@ -80,3 +80,12 @@ find_multicast_capable_address (void)
return NULL;
#endif
}
+
+gchar *
+get_fullpath (const gchar *filename)
+{
+ if (g_getenv ("SRCDIR"))
+ return g_strdup_printf ("%s/%s", g_getenv ("SRCDIR"), filename);
+ else
+ return g_strdup (filename);
+}
diff --git a/tests/check/testutils.h b/tests/check/testutils.h
index c199f67..ef1df35 100644
--- a/tests/check/testutils.h
+++ b/tests/check/testutils.h
@@ -27,6 +27,8 @@ G_BEGIN_DECLS
gchar *find_multicast_capable_address (void);
+gchar *get_fullpath (const gchar *filename);
+
G_END_DECLS
#endif /* __UTILS_H__ */
diff --git a/tests/check/utils/binadded.c b/tests/check/utils/binadded.c
index 823293b..35f8640 100644
--- a/tests/check/utils/binadded.c
+++ b/tests/check/utils/binadded.c
@@ -244,7 +244,6 @@ GST_START_TEST (test_bin_keyfile)
}
GST_END_TEST;
-
GST_START_TEST (test_bin_errors)
{
FsElementAddedNotifier *notifier = NULL;
--
1.5.6.5
More information about the farsight-commits
mailing list