aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am65
1 files changed, 35 insertions, 30 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8e329e..5c7d802 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,56 +4,61 @@ BUILT_SOURCES =
check_PROGRAMS =
###
-###
+### tests: stock tests on user-visible strings
###
-# stock UMB tests on user-visible strings
include $(srcdir)/Makefile.am.strings
+###
+### gtest library
+###
+
check_LIBRARIES = libgtest.a
nodist_libgtest_a_SOURCES = \
- $(GTEST_SOURCE)/gtest-all.cc \
- $(GTEST_SOURCE)/gtest_main.cc
+ $(GTEST_SOURCE)/src/gtest-all.cc \
+ $(GTEST_SOURCE)/src/gtest_main.cc
AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I${top_srcdir}/src -Wall -Werror
AM_CXXFLAGS = $(GTEST_CXXFLAGS)
###
+### tests: indicator-power-device
###
-###
-
-TEST_LIBS = \
- $(COVERAGE_LDFLAGS) \
- $(XORG_GTEST_LDFLAGS) \
- libgtest.a
-TEST_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- $(SERVICE_DEPS_CFLAGS)
-
-BUILT_SOURCES += gschemas.compiled
-CLEANFILES += gschemas.compiled
-gschemas.compiled: Makefile
- @glib-compile-schemas --targetdir=$(abs_builddir) $(top_builddir)/data
+TEST_LIBS = $(COVERAGE_LDFLAGS) libgtest.a -lpthread
+TEST_CPPFLAGS = $(SERVICE_DEPS_CFLAGS) $(AM_CPPFLAGS)
TESTS += test-device
check_PROGRAMS += test-device
test_device_SOURCES = test-device.cc
-test_device_LDADD = $(TEST_LIBS)
-test_device_CPPFLAGS = $(TEST_CPPFLAGS)
+test_device_CPPFLAGS = $(TEST_CPPFLAGS) -Wall -Werror -Wextra
+test_device_LDADD = \
+ $(top_builddir)/src/libindicatorpower-service.a \
+ $(SERVICE_DEPS_LIBS) \
+ $(TEST_LIBS)
+
+# (FIXME: incomplete)
+#
+###
+### tests: indicator-power-service
+###
+#
+# build a local copy of the GSettings schemas
+#BUILT_SOURCES += gschemas.compiled
+#CLEANFILES += gschemas.compiled
+#gschemas.compiled: Makefile
+# @glib-compile-schemas --targetdir=$(abs_builddir) $(top_builddir)/data
+#
+#TESTS += test-service
+#check_PROGRAMS += test-service
+#test_service_SOURCES = test-service.cc
+#test_service_LDADD = $(TEST_LIBS)
+#test_service_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\""
+#
#TESTS += test-dbus-listener
#check_PROGRAMS += test-dbus-listener
#test_dbus_listener_SOURCES = test-dbus-listener.cc
#test_dbus_listener_LDADD = $(TEST_LIBS)
#test_dbus_listener_CPPFLAGS = $(TEST_CPPFLAGS)
-
-TESTS += test-indicator
-check_PROGRAMS += test-indicator
-test_indicator_SOURCES = test-indicator.cc
-test_indicator_LDADD = $(TEST_LIBS)
-test_indicator_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\""
-
-###
-###
-###
+#