Added tests for the vertex clipping code.
[platform/upstream/weston.git] / tests / Makefile.am
1 TESTS = $(shared_tests) $(module_tests) $(weston_tests)
2
3 shared_tests = \
4         config-parser.test              \
5         vertex-clip.test
6
7 module_tests =                          \
8         surface-test.la                 \
9         surface-global-test.la
10
11 weston_test = weston-test.la
12
13 weston_tests =                          \
14         keyboard.weston                 \
15         event.weston                    \
16         button.weston                   \
17         text.weston                     \
18         subsurface.weston               \
19         $(xwayland_test)
20
21 AM_TESTS_ENVIRONMENT = \
22         abs_builddir='$(abs_builddir)'; export abs_builddir;
23
24 TEST_EXTENSIONS = .la .weston
25 LA_LOG_COMPILER = $(srcdir)/weston-tests-env
26 WESTON_LOG_COMPILER = $(srcdir)/weston-tests-env
27
28 clean-local:
29         -rm -rf logs
30
31 # To remove when automake 1.11 support is dropped
32 export abs_builddir
33
34 noinst_LTLIBRARIES =                    \
35         $(weston_test)                  \
36         $(module_tests)
37
38 noinst_PROGRAMS =                       \
39         $(setbacklight)                 \
40         $(shared_tests)                 \
41         $(weston_tests)                 \
42         matrix-test
43
44 AM_CFLAGS = $(GCC_CFLAGS)
45 AM_CPPFLAGS =                                   \
46         -I$(top_srcdir)/src                     \
47         -I$(top_srcdir)/shared                  \
48         -I$(top_builddir)/src                   \
49         -DUNIT_TEST                             \
50         $(COMPOSITOR_CFLAGS)
51
52 surface_global_test_la_SOURCES = surface-global-test.c
53 surface_global_test_la_LDFLAGS = -module -avoid-version -rpath $(libdir)
54 surface_test_la_SOURCES = surface-test.c
55 surface_test_la_LDFLAGS = -module -avoid-version -rpath $(libdir)
56
57 weston_test_la_LIBADD = $(COMPOSITOR_LIBS)      \
58         ../shared/libshared.la
59 weston_test_la_LDFLAGS = -module -avoid-version -rpath $(libdir)
60 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
61 weston_test_la_SOURCES =                \
62         weston-test.c                   \
63         wayland-test-protocol.c         \
64         wayland-test-server-protocol.h
65
66 weston_test_runner_src =                \
67         weston-test-runner.c            \
68         weston-test-runner.h
69
70 check_LTLIBRARIES = libshared-test.la
71
72 libshared_test_la_SOURCES =     \
73         $(weston_test_runner_src)
74 libshared_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
75
76 config_parser_test_LDADD =      \
77         ../shared/libshared.la  \
78         libshared-test.la       \
79         $(COMPOSITOR_LIBS)
80 config_parser_test_SOURCES =    \
81         config-parser-test.c
82 vertex_clip_test_SOURCES =              \
83         vertex-clip-test.c              \
84         ../src/vertex-clipping.c        \
85         ../src/vertex-clipping.h
86 vertex_clip_test_LDADD =        \
87         libshared-test.la       \
88         -lm -lrt
89
90 weston_test_client_src =                \
91         weston-test-client-helper.c     \
92         weston-test-client-helper.h     \
93         wayland-test-protocol.c         \
94         wayland-test-client-protocol.h  \
95         subsurface-protocol.c           \
96         subsurface-client-protocol.h
97 weston_test_client_libs =               \
98         $(SIMPLE_CLIENT_LIBS)           \
99         ../shared/libshared.la          \
100         libshared-test.la
101
102 keyboard_weston_SOURCES = keyboard-test.c $(weston_test_client_src)
103 keyboard_weston_LDADD = $(weston_test_client_libs)
104
105 event_weston_SOURCES = event-test.c $(weston_test_client_src)
106 event_weston_LDADD = $(weston_test_client_libs)
107
108 button_weston_SOURCES = button-test.c $(weston_test_client_src)
109 button_weston_LDADD = $(weston_test_client_libs)
110
111 text_weston_SOURCES =                           \
112         text-test.c                             \
113         ../clients/text-protocol.c              \
114         $(weston_test_client_src)
115 text_weston_LDADD = $(weston_test_client_libs)
116
117 subsurface_weston_SOURCES = subsurface-test.c $(weston_test_client_src)
118 subsurface_weston_LDADD = $(weston_test_client_libs)
119
120 xwayland_weston_SOURCES = xwayland-test.c       $(weston_test_client_src)
121
122 xwayland_weston_LDADD = $(weston_test_client_libs) $(XWAYLAND_TEST_LIBS)
123
124 if ENABLE_XWAYLAND_TEST
125 xwayland_test = xwayland.weston
126 endif
127
128 matrix_test_SOURCES =                           \
129         matrix-test.c                           \
130         $(top_srcdir)/shared/matrix.c           \
131         $(top_srcdir)/shared/matrix.h
132 matrix_test_LDADD = -lm -lrt
133
134 setbacklight_SOURCES =                          \
135         setbacklight.c                          \
136         $(top_srcdir)/src/libbacklight.c        \
137         $(top_srcdir)/src/libbacklight.h
138
139 setbacklight_CFLAGS = $(AM_CFLAGS) $(SETBACKLIGHT_CFLAGS)
140 setbacklight_LDADD = $(SETBACKLIGHT_LIBS)
141
142 if BUILD_SETBACKLIGHT
143 setbacklight = setbacklight
144 endif
145
146 EXTRA_DIST = weston-tests-env
147
148 BUILT_SOURCES =                                 \
149         subsurface-protocol.c                   \
150         subsurface-client-protocol.h            \
151         wayland-test-protocol.c                 \
152         wayland-test-server-protocol.h          \
153         wayland-test-client-protocol.h
154
155 CLEANFILES = $(BUILT_SOURCES)
156
157 wayland_protocoldir = $(top_srcdir)/protocol
158 include $(top_srcdir)/wayland-scanner.mk