[folks] Relocate Folks.TestCase as a separate library
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Relocate Folks.TestCase as a separate library
- Date: Wed, 6 Oct 2010 18:13:05 +0000 (UTC)
commit ccc49aa4317f8a6a3ca6f5de04a74e0842a6a2eb
Author: Travis Reitter <travis reitter collabora co uk>
Date: Wed Oct 6 10:28:59 2010 -0700
Relocate Folks.TestCase as a separate library
configure.ac | 1 +
tests/lib/Makefile.am | 27 +++++++++++++++++++++++++++
tests/lib/folks-test-uninstalled.pc.in | 12 ++++++++++++
tests/{telepathy => lib}/test-case.vala | 0
tests/telepathy/Makefile.am | 8 ++++----
5 files changed, 44 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e55c98e..0dc5f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,6 +221,7 @@ AC_CONFIG_FILES([
tests/Makefile
tests/telepathy/Makefile
tests/lib/Makefile
+ tests/lib/folks-test-uninstalled.pc
tests/lib/telepathy/Makefile
tests/lib/telepathy/contactlist/Makefile
tests/lib/telepathy/contactlist/session.conf
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index ba7cb9a..8b6b734 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -2,4 +2,31 @@ SUBDIRS = \
telepathy \
$(NULL)
+noinst_LTLIBRARIES = libfolks-test.la
+
+libfolks_test_la_SOURCES = test-case.vala
+libfolks_test_la_CFLAGS = $(GLIB_CFLAGS)
+libfolks_test_la_LIBADD = $(GLIB_LIBS)
+
+libfolks_test_la_VALAFLAGS = \
+ $(VALAFLAGS) \
+ --pkg gobject-2.0 \
+ --library folks-test \
+ -H folks-test.h \
+ $(NULL)
+
+# The quoting here is unnecessary but harmless, and has the useful side-effect
+# that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
+# command as an error message in a bizarrely named file
+libfolks_test_la_LDFLAGS = \
+ -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
+
+CLEANFILES = \
+ $(libfolks_test_la_SOURCES:.vala=.c) \
+ *.stamp \
+ folks-test.h \
+ folks-test.vapi \
+ folks-test-uninstalled.pc \
+ $(NULL)
+
-include $(top_srcdir)/git.mk
diff --git a/tests/lib/folks-test-uninstalled.pc.in b/tests/lib/folks-test-uninstalled.pc.in
new file mode 100644
index 0000000..30c7333
--- /dev/null
+++ b/tests/lib/folks-test-uninstalled.pc.in
@@ -0,0 +1,12 @@
+prefix=
+exec_prefix=
+abs_top_srcdir= abs_top_srcdir@
+abs_top_builddir= abs_top_builddir@
+vapidir= abs_top_srcdir@/folks
+
+Name: Folks test support library (uninstalled copy)
+Description: test support library for the Folks meta-contacts library
+Version: @VERSION@
+Requires: glib-2.0 gobject-2.0
+Libs: ${abs_top_builddir}/tests/lib/libfolks-test.la
+Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/tests/lib -I${abs_top_builddir}
diff --git a/tests/telepathy/test-case.vala b/tests/lib/test-case.vala
similarity index 100%
rename from tests/telepathy/test-case.vala
rename to tests/lib/test-case.vala
diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am
index 3b6fd15..4ff9d63 100644
--- a/tests/telepathy/Makefile.am
+++ b/tests/telepathy/Makefile.am
@@ -5,11 +5,13 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/folks \
-I$(top_srcdir)/backends/telepathy \
-I$(top_srcdir)/backends/telepathy/lib \
+ -I$(top_srcdir)/tests/lib \
-I$(top_srcdir)/tests/lib/telepathy/contactlist \
-include $(CONFIG_HEADER) \
$(NULL)
LDADD = \
+ $(top_builddir)/tests/lib/libfolks-test.la \
$(top_builddir)/tests/lib/telepathy/contactlist/libtp-test-contactlist.la \
$(top_builddir)/backends/telepathy/lib/libfolks-telepathy.la \
$(top_builddir)/folks/libfolks.la
@@ -23,6 +25,7 @@ RUN_WITH_PRIVATE_BUS = $(top_srcdir)/tests/tools/with-session-bus.sh
VALAFLAGS += \
--vapidir=$(top_builddir)/tests/lib/telepathy/contactlist/ \
+ --vapidir=$(top_builddir)/tests/lib/ \
--vapidir=. \
--vapidir=$(top_srcdir)/folks \
--vapidir=$(top_srcdir)/backends/telepathy/lib \
@@ -34,6 +37,7 @@ VALAFLAGS += \
--pkg telepathy-glib \
--pkg folks \
--pkg folks-telepathy \
+ --pkg folks-test \
--pkg tp-test-contactlist \
$(NULL)
@@ -48,15 +52,11 @@ noinst_PROGRAMS = \
contact-properties \
$(NULL)
-# FIXME: turn test-case into a library that the tests use or push it into the
-# existing library
contact_retrieval_SOURCES = \
- test-case.vala \
contact-retrieval.vala \
$(NULL)
contact_properties_SOURCES = \
- test-case.vala \
contact-properties.vala \
$(NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]