aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: 9a3465468e64e9aee35ab99fd369e3d99413ee7e (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

CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
check_PROGRAMS =

TESTS = \
	server-tester \
	dbus-interface-tester

#####################################
# Server Test
#####################################

SERVER_XML_REPORT = server-test.xml
server-tester: server-test Makefile.am
	@echo "#!/bin/bash" > $@
	@echo gtester --verbose -k -o $(SERVER_XML_REPORT) $(abs_builddir)/server-test >> $@
	@chmod +x $@

CLEANFILES += \
	$(SERVER_XML_REPORT) \
	server-tester

server_test_SOURCES = \
	server-test.c
server_test_CFLAGS = \
	-I$(top_srcdir)/src \
	-I$(top_builddir)/src \
	$(SERVICE_CFLAGS)
server_test_LDADD = \
	$(top_builddir)/src/libservers.la \
	$(SERVICE_LIBS)

check_PROGRAMS += server-test

#####################################
# DBus Interface
#####################################

DBUS_XML_REPORT = dbus-interface.xml
dbus-interface-tester: dbus-interface uccs-config.conf slmock-config.conf Makefile.am
	@echo "#!/bin/bash" > $@
	@echo gtester --verbose -k -o $(DBUS_XML_REPORT) $(abs_builddir)/dbus-interface >> $@
	@chmod +x $@

CLEANFILES += \
	$(DBUS_XML_REPORT) \
	dbus-interface-tester \
	slmock-config.conf

EXTRA_DIST += \
	null-config.conf \
	uccs-config.conf \
	slmock \
	slmock-config.conf.in

slmock-config.conf: slmock-config.conf.in
	sed -e "s|\@slmock\@|$(abs_srcdir)/slmock|" $< > $@
dbus_interface_SOURCES = \
	dbus-interface.c
dbus_interface_CFLAGS = \
	-DREMOTE_LOGON_SERVICE="\"$(abs_top_builddir)/src/remote-logon-service\"" \
	-DUCCS_CONFIG_FILE="\"$(abs_srcdir)/uccs-config.conf\"" \
	-DSLMOCK_CONFIG_FILE="\"$(abs_builddir)/slmock-config.conf\"" \
	-DNULL_CONFIG_FILE="\"$(abs_srcdir)/null-config.conf\"" \
	$(SERVICE_CFLAGS) \
	$(TEST_CFLAGS)
dbus_interface_LDADD = \
	$(SERVICE_LIBS) \
	$(TEST_LIBS)

check_PROGRAMS += dbus-interface