aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: 483bb8c2e482156695c8b8badfc7246cb213154f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
TESTS =
CLEANFILES = 
BUILT_SOURCES =
check_PROGRAMS =

###
###  tests: stock tests on user-visible strings
###

include $(srcdir)/Makefile.am.strings

###
###  gtest library
###

check_LIBRARIES = libgtest.a
nodist_libgtest_a_SOURCES = \
  $(GTEST_SOURCE)/src/gtest-all.cc \
  $(GTEST_SOURCE)/src/gtest_main.cc

AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I${top_srcdir}/src -Wall -Werror -std=c++11
AM_CXXFLAGS = $(GTEST_CXXFLAGS)

###
###  tests: indicator-power-device
###

dear-reader-please-note-the-next-test-takes-90-seconds:
	@echo "#!/bin/bash" > $@
	@echo "exit 0" >> $@
	@chmod +x $@
TESTS += dear-reader-please-note-the-next-test-takes-90-seconds
CLEANFILES += dear-reader-please-note-the-next-test-takes-90-seconds

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_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)
#