[gstreamermm: 122/167] created Makefile.am for tests (run make check to compile and run all tests, run ./tests/run-all.sh t
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 122/167] created Makefile.am for tests (run make check to compile and run all tests, run ./tests/run-all.sh t
- Date: Tue, 3 Sep 2013 19:29:19 +0000 (UTC)
commit 332f3f46c6e3aee1545531bb8d048a381c542e96
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Fri Aug 2 12:02:15 2013 +0200
created Makefile.am for tests (run make check to compile and run all tests, run ./tests/run-all.sh to run
all tests with gtest params
.gitignore | 40 +--
Makefile | 950 --------------------------------
Makefile.am | 2 +-
configure.ac | 2 +-
old-tests/Makefile.am | 66 ---
old-tests/test-buffer-list-iterator.cc | 10 -
old-tests/test-buffer-mapinfo.cc | 29 -
old-tests/test-caps-structures.cc | 82 ---
old-tests/test-caps.cc | 110 ----
old-tests/test-create-bin.cc | 57 --
old-tests/test-create-bus.cc | 33 --
old-tests/test-create-element.cc | 34 --
old-tests/test-event-wrap.cc | 57 --
old-tests/test-ghost-pad.cc | 83 ---
old-tests/test-init-check-noargs.cc | 59 --
old-tests/test-init-check.cc | 56 --
old-tests/test-init-noargs.cc | 34 --
old-tests/test-init.cc | 43 --
old-tests/test-interface.cc | 72 ---
old-tests/test-iterator.cc | 118 ----
old-tests/test-link-elements.cc | 44 --
old-tests/test-message-wrap.cc | 54 --
old-tests/test-miniobject-wrap.cc | 38 --
old-tests/test-pad.cc | 65 ---
old-tests/test-pipeline-add-element.cc | 39 --
old-tests/test-plugin-appsink.cc | 101 ----
old-tests/test-plugin-appsrc.cc | 82 ---
old-tests/test-plugin-gen.cc | 45 --
old-tests/test-plugin-pushsrc.cc | 140 -----
old-tests/test-plugin-register.cc | 158 ------
old-tests/test-plugin-signals.cc | 122 ----
old-tests/test-property-caps.cc | 55 --
old-tests/test-query-wrap.cc | 54 --
old-tests/test-structure.cc | 73 ---
old-tests/test-taglist.cc | 66 ---
old-tests/test-tagsetter.cc | 65 ---
tests/Makefile | 20 -
tests/Makefile.am | 36 ++
tests/run-all.sh | 9 +
39 files changed, 53 insertions(+), 3150 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dbf47d9..fe95770 100644
--- a/.gitignore
+++ b/.gitignore
@@ -463,40 +463,12 @@ gstreamer/src/xvimagesink.ccg
gstreamer/src/xvimagesink.hg
#tests/
-tests/test-all
-!tests/Makefile
-
-# old-tests/
-old-tests/test-buffer-mapinfo
-old-tests/test-caps
-old-tests/test-caps-structures
-old-tests/test-create-bin
-old-tests/test-create-bus
-old-tests/test-create-element
-old-tests/test-event-wrap
-old-tests/test-ghost-pad
-old-tests/test-init
-old-tests/test-init-check
-old-tests/test-init-check-noargs
-old-tests/test-init-noargs
-old-tests/test-interface
-old-tests/test-iterator
-old-tests/test-link-elements
-old-tests/test-message-wrap
-old-tests/test-miniobject-wrap
-old-tests/test-pad
-old-tests/test-pipeline-add-element
-old-tests/test-plugin-appsink
-old-tests/test-plugin-appsrc
-old-tests/test-plugin-gen
-old-tests/test-plugin-pushsrc
-old-tests/test-plugin-register
-old-tests/test-plugin-signals
-old-tests/test-property-caps
-old-tests/test-query-wrap
-old-tests/test-structure
-old-tests/test-taglist
-old-tests/test-tagsetter
+tests/test-buffer
+tests/test-bus
+tests/test-caps
+tests/test-pad
+tests/test-structure
+tests/test-taglist
# tools/
/tools/extra_defs_gen/generate_defs_gst
diff --git a/Makefile.am b/Makefile.am
index 0f53785..539035b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,7 @@ doc_subdirs = docs
else
doc_subdirs =
endif
-SUBDIRS = tools $(src_subdirs) gstreamer/gstreamermm old-tests examples $(doc_subdirs)
+SUBDIRS = tools $(src_subdirs) gstreamer/gstreamermm tests examples $(doc_subdirs)
gstreamermm_includedir = $(includedir)/$(GSTREAMERMM_MODULE_NAME)
gstreamermm_include_HEADERS = gstreamer/gstreamermm.h
diff --git a/configure.ac b/configure.ac
index 09ea3cc..6c6c177 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,7 +193,7 @@ AC_CONFIG_FILES([Makefile
gstreamer/src/Makefile
gstreamer/gstreamermm/Makefile
examples/Makefile
- old-tests/Makefile
+ tests/Makefile
docs/Makefile
docs/reference/Doxyfile])
AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..26153a9
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,36 @@
+## Copyright 2009 The gstreamermm Development Team
+##
+## This library is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+gstreamermm_includes = -I$(top_builddir)/gstreamer $(if $(srcdir:.=),-I$(top_srcdir)/gstreamer)
+local_libgstreamermm = $(top_builddir)/gstreamer/gstreamermm/libgstreamermm-$(GSTREAMERMM_API_VERSION).la
+
+AM_CPPFLAGS = -I$(top_builddir) $(gstreamermm_includes) $(GSTREAMERMM_CFLAGS)
+AM_CXXFLAGS = $(GSTREAMERMM_WXXFLAGS) -g
+LDADD = $(GSTREAMERMM_LIBS) $(local_libgstreamermm) -lgtest
+
+check_PROGRAMS = test-caps test-buffer test-bus test-caps test-pad \
+ test-structure test-taglist
+
+# Include run of test programs in check:
+TESTS = $(check_PROGRAMS)
+
+test_caps_SOURCES = test-caps.cc main.cc
+test_buffer_SOURCES = test-buffer.cc main.cc
+test_bus_SOURCES = test-bus.cc main.cc
+test_caps_SOURCES = test-caps.cc main.cc
+test_pad_SOURCES = test-pad.cc main.cc
+test_structure_SOURCES = test-structure.cc main.cc
+test_taglist_SOURCES = test-taglist.cc main.cc
+
diff --git a/tests/run-all.sh b/tests/run-all.sh
new file mode 100755
index 0000000..320a728
--- /dev/null
+++ b/tests/run-all.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+#this script is a workaround for passing arguments to all tests
+ARRAY=(`ls | egrep -e "test-[^\.]+$"`)
+COUNT="0"
+
+for i in ${ARRAY[*]}; do
+ "./$i" $@
+ let COUNT++;
+done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]