aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: bbae7fedeeadf2cfe4fffed53bfc7a01cd9fadf0 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

check_PROGRAMS = \
	test-indicator-sound \
	test-indicator-sound-dbus-client \
	test-indicator-sound-dbus-server 

TESTS = test-indicator-sound
DISTCLEANFILES = $(TESTS)

noinst_LTLIBRARIES        = libmockpulse.la
libmockpulse_la_SOURCES = mockpulse.c
libmockpulse_la_CFLAGS = $(PULSEAUDIO_CFLAGS)


#########################################
##  test-indicator-sound
#########################################
test_indicator_sound_SOURCES = \
	test-indicator-sound.c \
    $(top_builddir)/src/indicator-sound.c
    
test_indicator_sound_CFLAGS = \
	$(PULSEAUDIO_CFLAGS) \
	$(APPLET_CFLAGS) \
	-Wall -Werror \
	-I$(srcdir) \
	-DTOP_BUILD_DIR="\"${abs_top_builddir}\""

test_indicator_sound_LDADD = \
	libmockpulse.la \
	$(PULSEAUDIO_LIBS) \
	$(APPLET_LIBS) 


#########################################
##  test-indicator-sound-dbus-client
#########################################

test_indicator_sound_dbus_client_SOURCES = \
	test-defines.h \
	test-indicator-sound-dbus-client.c

test_indicator_sound_dbus_client_CFLAGS = \
	$(PULSEAUDIO_CFLAGS) \
	$(SOUNDSERVICE_CFLAGS) \
	-Wall -Werror \
	-I$(srcdir) \
    -I$(SOUNDSERVICE_CFLAGS)

test_indicator_sound_dbus_client_LDADD = \
	libmockpulse.la \
	$(PULSEAUDIO_LIBS) \
	$(SOUNDSERVICE_LIBS)

########################################
#  test-indicator-sound-dbus-server
########################################
test_indicator_sound_dbus_server_SOURCES = \
	test-defines.h \
    test-indicator-sound-dbus-server.c \
    $(top_builddir)/src/sound-service-dbus.c \
    $(top_builddir)/src/pulse-manager.c \
    $(top_builddir)/src/slider-menu-item.c \
    $(top_builddir)/src/dbus-menu-manager.c

test_indicator_sound_dbus_server_CFLAGS = \
    $(SOUNDSERVICE_CFLAGS) \
	-Wall -Werror \
	-I$(srcdir) 

test_indicator_sound_dbus_server_LDADD = \
	$(SOUNDSERVICE_LIBS) \ 
	$(PULSEAUDIO_LIBS) 


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

XML_REPORT   = indicator-sound-check-results.xml
HTML_REPORT  = indicator-sound-check-results.html

indicator-sound-tests: indicator-sound-tests-gtester Makefile.am
	@echo "#!/bin/sh" > $@
	@echo $(DBUS_RUNNER) --task ./indicator-sound-tests-gtester >> $@
	@chmod +x $@

indicator-sound-tests-gtester: test-indicator-sound Makefile.am
	@echo "#!/bin/sh" > $@
	@echo gtester -k --verbose -o=indicator-sound-check-results.xml ./test-indicator-sound >> $@
	@chmod +x $@

 TESTS += indicator-sound-tests-gtester

DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) indicator-sound-tests-gtester

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

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

TESTS += test-indicator-sound-dbus