aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: f6a0525aba1ff7260c4a9143f7d98beed460d20b (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
72
73
74
75
76
77
78
79
80
81
82
83
84

check_PROGRAMS = \
	test-libcustomindicator \
	test-libcustomindicator-dbus-client \
	test-libcustomindicator-dbus-server

TESTS =
DISTCLEANFILES = $(TESTS)

#########################################
##  test-libcustomindicator
#########################################

test_libcustomindicator_SOURCES = \
	test-libcustomindicator.c

test_libcustomindicator_CFLAGS = \
	$(INDICATOR_CFLAGS) \
	-Wall -Werror \
	-I$(top_srcdir)/src

test_libcustomindicator_LDADD = \
	$(INDICATOR_LIBS) \
	$(top_builddir)/src/libcustomindicator.la

#########################################
##  test-libcustomindicator-dbus-client
#########################################

test_libcustomindicator_dbus_client_SOURCES = \
	test-defines.h \
	test-libcustomindicator-dbus-client.c

test_libcustomindicator_dbus_client_CFLAGS = \
	$(INDICATOR_CFLAGS) \
	-Wall -Werror \
	-I$(top_srcdir)/src

test_libcustomindicator_dbus_client_LDADD = \
	$(INDICATOR_LIBS) \
	$(top_builddir)/src/libcustomindicator.la

#########################################
##  test-libcustomindicator-dbus-server
#########################################

test_libcustomindicator_dbus_server_SOURCES = \
	test-defines.h \
	test-libcustomindicator-dbus-server.c

test_libcustomindicator_dbus_server_CFLAGS = \
	$(INDICATOR_CFLAGS) \
	-Wall -Werror \
	-I$(top_srcdir)/src

test_libcustomindicator_dbus_server_LDADD = \
	$(INDICATOR_LIBS) \
	$(top_builddir)/src/libcustomindicator.la

#########################################
##  Actual tests
#########################################

XML_REPORT   = libcustomindicator-check-results.xml
HTML_REPORT  = libcustomindicator-check-results.html

libcustomindicator-tests: test-libcustomindicator
	@echo "#!/bin/sh" > libcustomindicator-tests
	@echo gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator >> libcustomindicator-tests
	@chmod +x libcustomindicator-tests

TESTS += libcustomindicator-tests
DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT)


DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf

test-libcustomindicator-dbus: test-libcustomindicator-dbus-client test-libcustomindicator-dbus-server Makefile.am
	@echo "#!/bin/sh" > test-libcustomindicator-dbus
	@echo $(DBUS_RUNNER) --task ./test-libcustomindicator-dbus-client --task-name Client --task ./test-libcustomindicator-dbus-server --task-name Server --ignore-return >> test-libcustomindicator-dbus
	@chmod +x test-libcustomindicator-dbus

TESTS += test-libcustomindicator-dbus