[gssdp] tests: Move test code



commit e30a46a5ad5c6010b04d653e66f6a6c8f26381c9
Author: Jens Georg <mail jensge org>
Date:   Sat Jan 31 13:38:31 2015 +0100

    tests: Move test code
    
    Move tests that are actually examples into a new examples folder and move
    everything in gtest folder into test.
    
    Signed-off-by: Jens Georg <mail jensge org>

 Makefile.am                         |    2 +-
 configure.ac                        |    2 +-
 examples/Makefile.am                |   13 +++++++++++++
 {tests => examples}/test-browser.c  |    0
 {tests => examples}/test-publish.c  |    0
 tests/Makefile.am                   |   29 +++++++++++++++++++----------
 tests/gtest/Makefile.am             |   24 ------------------------
 tests/{gtest => }/test-functional.c |    0
 tests/{gtest => }/test-regression.c |    0
 tests/{gtest => }/test-util.c       |    0
 tests/{gtest => }/test-util.h       |    0
 11 files changed, 34 insertions(+), 36 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f5aba61..7363921 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ else
 TOOLS_DIR =
 endif
 
-SUBDIRS = libgssdp $(TOOLS_DIR) tests doc vala
+SUBDIRS = libgssdp $(TOOLS_DIR) tests examples doc vala
 
 ACLOCAL_AMFLAGS=${ACLOCAL_FLAGS} -I m4
 
diff --git a/configure.ac b/configure.ac
index 86b2851..4c08d4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,7 +162,7 @@ Makefile
 libgssdp/Makefile
 tools/Makefile
 tests/Makefile
-tests/gtest/Makefile
+examples/Makefile
 vala/Makefile
 doc/Makefile
 doc/version.xml
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..9f47337
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,13 @@
+AM_CFLAGS = $(LIBGSSDP_CFLAGS) -I$(top_srcdir)
+
+noinst_PROGRAMS = test-browser test-publish
+
+test_browser_SOURCES = test-browser.c
+test_browser_LDADD   = $(top_builddir)/libgssdp/libgssdp-1.0.la $(LIBGSSDP_LIBS)
+
+test_publish_SOURCES = test-publish.c
+test_publish_LDADD   = $(top_builddir)/libgssdp/libgssdp-1.0.la $(LIBGSSDP_LIBS)
+
+CLEANFILES = $(BUILT_SOURCES)
+DISTCLEANFILES = $(BUILT_SOURCES)
+MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES)
diff --git a/tests/test-browser.c b/examples/test-browser.c
similarity index 100%
rename from tests/test-browser.c
rename to examples/test-browser.c
diff --git a/tests/test-publish.c b/examples/test-publish.c
similarity index 100%
rename from tests/test-publish.c
rename to examples/test-publish.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5c0809f..722f058 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,15 +1,24 @@
-SUBDIRS = gtest
+TESTS_ENVIRONMENT = G_SLICE=debug-blocks \
+                   LD_LIBRARY_PATH=$(top_builddir)/libgssdp/.libs:$(LD_LIBRARY_PATH)
 
-AM_CFLAGS = $(LIBGSSDP_CFLAGS) -I$(top_srcdir)
+TESTS=$(check_PROGRAMS)
 
-noinst_PROGRAMS = test-browser test-publish
+check_PROGRAMS = test-regression test-functional
 
-test_browser_SOURCES = test-browser.c
-test_browser_LDADD   = $(top_builddir)/libgssdp/libgssdp-1.0.la $(LIBGSSDP_LIBS)
+noinst_LIBRARIES = libtestutil.a
 
-test_publish_SOURCES = test-publish.c
-test_publish_LDADD   = $(top_builddir)/libgssdp/libgssdp-1.0.la $(LIBGSSDP_LIBS)
+libtestutil_a_SOURCES = test-util.h test-util.c
+
+test_regression_SOURCES = test-regression.c
+test_functional_SOURCES = test-functional.c
+
+LDADD = \
+       $(top_builddir)/libgssdp/libgssdp-1.0.la \
+       libtestutil.a \
+       $(LIBGSSDP_LIBS)
+
+AM_CFLAGS = \
+           $(LIBGSSDP_CFLAGS) \
+           -I $(top_srcdir) \
+           -DDATA_PATH="\"$(srcdir)\""
 
-CLEANFILES = $(BUILT_SOURCES)
-DISTCLEANFILES = $(BUILT_SOURCES)
-MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES)
diff --git a/tests/gtest/test-functional.c b/tests/test-functional.c
similarity index 100%
rename from tests/gtest/test-functional.c
rename to tests/test-functional.c
diff --git a/tests/gtest/test-regression.c b/tests/test-regression.c
similarity index 100%
rename from tests/gtest/test-regression.c
rename to tests/test-regression.c
diff --git a/tests/gtest/test-util.c b/tests/test-util.c
similarity index 100%
rename from tests/gtest/test-util.c
rename to tests/test-util.c
diff --git a/tests/gtest/test-util.h b/tests/test-util.h
similarity index 100%
rename from tests/gtest/test-util.h
rename to tests/test-util.h


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]