Added a testsuite. This currently only has one test, which replicates a problem...
authorRichard Boulton <richard@tartarus.org>
Fri, 9 Mar 2001 12:08:38 +0000 (12:08 +0000)
committerRichard Boulton <richard@tartarus.org>
Fri, 9 Mar 2001 12:08:38 +0000 (12:08 +0000)
Original commit message from CVS:
Added a testsuite.  This currently only has one test, which replicates a
problem just submitted to the list.

I hope noone disagrees that we need a testsuite.  Also, hopefully we all
think that a tiny testsuite which is easy to add tests to is much better
than a huge project to create a complete testsuite, which never gets
started because its too big and scary.

I suggest that tests get created whenever someone has a spare moment, or
whenever a bug is reported (to replicate the problem, and thus be sure that
when fixed it stays fixed), and before making a change to a piece of code
to ensure that it remains working.

If we all add little tests occasionally, then we'll have a good useful
testsuite before we know it.  All you need to do is make a

Makefile.am
configure.in
tests/old/testsuite/Makefile.am [new file with mode: 0644]
tests/old/testsuite/test_gst_init.c [new file with mode: 0644]
testsuite/Makefile.am [new file with mode: 0644]
testsuite/test_gst_init.c [new file with mode: 0644]

index f894e18..2fc9edf 100644 (file)
@@ -14,11 +14,11 @@ else
 SUBDIRS_DOCS =
 endif
 
-SUBDIRS = include gst libs plugins tools test tests examples \
+SUBDIRS = include gst libs plugins tools test tests testsuite examples \
 $(SUBDIRS_LGG) $(SUBDIRS_DOCS)
 
 # These are all the possible subdirs
-DIST_SUBDIRS = include gst libs plugins tools test tests examples gstplay editor docs debian
+DIST_SUBDIRS = include gst libs plugins tools test tests testsuite examples gstplay editor docs debian
 
 
 bin_SCRIPTS = gstreamer-config
index a9c2d63..a9209e4 100644 (file)
@@ -218,23 +218,6 @@ AC_SUBST(GDK_PIXBUF_LIBS)
 AC_SUBST(GDK_PIXBUF_CFLAGS)
 
 
-dnl Check for libghttp
-dnl FIXME: need to check for header
-AC_CHECK_LIB(ghttp, ghttp_request_new,
-  [GHTTP_LIBS="-lghttp"
-   GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
-   HAVE_LIBGHTTP=yes
-  ],
-  [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
-   GHTTP_LIBS=
-   GST_HTTPSRC_GET_TYPE=
-   HAVE_LIBGHTTP=no
-  ],
-  $LIBS)
-AC_SUBST(GHTTP_LIBS)
-AC_SUBST(GST_HTTPSRC_GET_TYPE)
-
-
 dnl Check for libgnome
 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
 if test x$GNOME_CONFIG = xno; then
@@ -245,10 +228,28 @@ if test x$GNOME_CONFIG = xno; then
 else
   GNOME_LIBS=`gnome-config --libs gnome gnomeui`
   GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
+  GHTTP_LIBS=`gnome-config --libs gnome gnomeui`
+  GHTTP_CFLAGS=`gnome-config --cflags gnome gnomeui`
   HAVE_GNOME=yes
 fi
 AC_SUBST(GNOME_LIBS)
 AC_SUBST(GNOME_CFLAGS)
+AC_SUBST(GHTTP_LIBS)
+
+dnl Check for libghttp
+dnl FIXME: need to check for header
+AC_CHECK_LIB(ghttp, ghttp_request_new,
+  [GHTTP_LIBS="-lghttp"
+   GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
+   HAVE_LIBGHTTP=yes
+  ],
+  [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
+   GHTTP_LIBS=
+   GST_HTTPSRC_GET_TYPE=
+   HAVE_LIBGHTTP=no
+  ],
+  $LIBS)
+AC_SUBST(GST_HTTPSRC_GET_TYPE)
 
 
 dnl Check for libglade
@@ -759,6 +760,7 @@ test/bindings/Makefile
 tests/Makefile
 tests/sched/Makefile
 tests/eos/Makefile
+testsuite/Makefile
 examples/Makefile
 examples/autoplug/Makefile
 examples/helloworld/Makefile
diff --git a/tests/old/testsuite/Makefile.am b/tests/old/testsuite/Makefile.am
new file mode 100644 (file)
index 0000000..9e32fd0
--- /dev/null
@@ -0,0 +1,11 @@
+SUBDIRS =
+
+testprogs = test_gst_init
+
+TESTS = $(testprogs)
+
+check_PROGRAMS = $(testprogs)
+
+# we have nothing but apps here, we can do this safely
+LIBS += $(GST_LIBS)
+CFLAGS += $(GST_CFLAGS)
diff --git a/tests/old/testsuite/test_gst_init.c b/tests/old/testsuite/test_gst_init.c
new file mode 100644 (file)
index 0000000..fd604e7
--- /dev/null
@@ -0,0 +1,7 @@
+#include <gst/gst.h>
+
+int
+main (int argc, char *argv[])
+{
+  gst_init(&argc,&argv);
+}
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
new file mode 100644 (file)
index 0000000..9e32fd0
--- /dev/null
@@ -0,0 +1,11 @@
+SUBDIRS =
+
+testprogs = test_gst_init
+
+TESTS = $(testprogs)
+
+check_PROGRAMS = $(testprogs)
+
+# we have nothing but apps here, we can do this safely
+LIBS += $(GST_LIBS)
+CFLAGS += $(GST_CFLAGS)
diff --git a/testsuite/test_gst_init.c b/testsuite/test_gst_init.c
new file mode 100644 (file)
index 0000000..fd604e7
--- /dev/null
@@ -0,0 +1,7 @@
+#include <gst/gst.h>
+
+int
+main (int argc, char *argv[])
+{
+  gst_init(&argc,&argv);
+}