summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: d4aa9098f912ccd1570da03fc01f4824e9c497bf (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
TESTS = $(shared_tests) $(module_tests) $(weston_tests)

shared_tests = \
	config-parser.test

module_tests =				\
	surface-test.la			\
	surface-global-test.la

weston_tests =				\
	keyboard.weston			\
	event.weston			\
	button.weston			\
	text.weston			\
	subsurface.weston		\
	$(xwayland_test)

AM_TESTS_ENVIRONMENT = \
	abs_builddir='$(abs_builddir)'; export abs_builddir;

TEST_EXTENSIONS = .la .weston
LA_LOG_COMPILER = $(srcdir)/weston-tests-env
WESTON_LOG_COMPILER = $(srcdir)/weston-tests-env

clean-local:
	-rm -rf logs

# To remove when automake 1.11 support is dropped
export abs_builddir

noinst_LTLIBRARIES =			\
	$(weston_test)

noinst_PROGRAMS =			\
	$(setbacklight)			\
	matrix-test

check_LTLIBRARIES =			\
	$(module_tests)

check_PROGRAMS =			\
	$(shared_tests)			\
	$(weston_tests)

AM_CFLAGS = $(GCC_CFLAGS)
AM_CPPFLAGS =					\
	-I$(top_srcdir)/src			\
	-I$(top_srcdir)/shared			\
	-I$(top_builddir)/src			\
	-DUNIT_TEST				\
	$(COMPOSITOR_CFLAGS)
AM_LDFLAGS = -module -avoid-version -rpath $(libdir)

config_parser_test_LDADD =	\
	../shared/libshared.la	\
	$(COMPOSITOR_LIBS)
config_parser_test_SOURCES =	\
	config-parser-test.c

surface_global_test_la_SOURCES = surface-global-test.c
surface_test_la_SOURCES = surface-test.c

weston_test = weston-test.la
weston_test_la_LIBADD = $(COMPOSITOR_LIBS)	\
	../shared/libshared.la
weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
weston_test_la_SOURCES =		\
	weston-test.c			\
	wayland-test-protocol.c		\
	wayland-test-server-protocol.h

weston_test_runner_src =		\
	weston-test-runner.c		\
	weston-test-runner.h
weston_test_client_src =		\
	weston-test-client-helper.c	\
	weston-test-client-helper.h	\
	wayland-test-protocol.c		\
	wayland-test-client-protocol.h	\
	subsurface-protocol.c		\
	subsurface-client-protocol.h	\
	$(weston_test_runner_src)
weston_test_client_libs =		\
	$(SIMPLE_CLIENT_LIBS)		\
	../shared/libshared.la

keyboard_weston_SOURCES = keyboard-test.c $(weston_test_client_src)
keyboard_weston_LDADD = $(weston_test_client_libs)

event_weston_SOURCES = event-test.c $(weston_test_client_src)
event_weston_LDADD = $(weston_test_client_libs)

button_weston_SOURCES = button-test.c $(weston_test_client_src)
button_weston_LDADD = $(weston_test_client_libs)

text_weston_SOURCES =				\
	text-test.c				\
	../clients/text-protocol.c		\
	$(weston_test_client_src)
text_weston_LDADD = $(weston_test_client_libs)

subsurface_weston_SOURCES = subsurface-test.c $(weston_test_client_src)
subsurface_weston_LDADD = $(weston_test_client_libs)

xwayland_weston_SOURCES = xwayland-test.c	$(weston_test_client_src)

xwayland_weston_LDADD = $(weston_test_client_libs) $(XWAYLAND_TEST_LIBS)

if ENABLE_XWAYLAND_TEST
xwayland_test = xwayland.weston
endif

matrix_test_SOURCES =				\
	matrix-test.c				\
	$(top_srcdir)/shared/matrix.c		\
	$(top_srcdir)/shared/matrix.h
matrix_test_LDADD = -lm -lrt

setbacklight_SOURCES =				\
	setbacklight.c				\
	$(top_srcdir)/src/libbacklight.c	\
	$(top_srcdir)/src/libbacklight.h

setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
setbacklight_LDADD = $(SETBACKLIGHT_LIBS)

if BUILD_SETBACKLIGHT
setbacklight = setbacklight
endif

EXTRA_DIST = weston-tests-env

BUILT_SOURCES =					\
	subsurface-protocol.c			\
	subsurface-client-protocol.h		\
	wayland-test-protocol.c			\
	wayland-test-server-protocol.h		\
	wayland-test-client-protocol.h

CLEANFILES = $(BUILT_SOURCES)

@wayland_scanner_rules@