aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: 61be169c97b96ef5272c5e2da07d1e1b382070f2 (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
NULL =

CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
check_PROGRAMS =

TESTS =											\
        server-tester									\
        dbus-interface-tester								\
        $(NULL)

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

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

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

server_test_SOURCES =									\
        server-test.c									\
        $(NULL)

server_test_CFLAGS =									\
        -I$(top_srcdir)/src								\
        -I$(top_builddir)/src								\
        -Werror										\
        $(SERVICE_CFLAGS)								\
        $(NULL)

server_test_LDADD =									\
        $(top_builddir)/src/libservers.la						\
        $(SERVICE_LIBS)									\
        $(NULL)

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								\
        $(NULL)

EXTRA_DIST +=										\
        null-config.conf								\
        uccs-config.conf								\
        slmock										\
        slmock-config.conf.in								\
        $(NULL)

slmock-config.conf: slmock-config.conf.in
	sed -e "s|\@slmock\@|$(abs_srcdir)/slmock|" $< > $@

dbus_interface_SOURCES =			\
        dbus-interface.c			\
        $(NULL)

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\""				\
        -Werror										\
        $(SERVICE_CFLAGS)								\
        $(TEST_CFLAGS)									\
        $(NULL)

dbus_interface_LDADD =									\
        $(SERVICE_LIBS)									\
        $(TEST_LIBS)									\
        $(NULL)

check_PROGRAMS += dbus-interface