diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2015-05-21 20:43:13 +0300 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-05-21 16:00:31 -0700 |
commit | 1fab2e7ba95a548129abf117f66e21c5a633091a (patch) | |
tree | 24f5e39e2832358e003f936e65df1932db90800c /Makefile.am | |
parent | 12cab2c4dfd4634e8979f78cec855a14091ce9d9 (diff) |
tests: add an headers test
This test checks that the protocol and library headers include only what
they are supposed to include. That is, that the core headers do not
include the protocol headers and that the core protocol headers do not
include the non core library headers.
The build process now generates core protocol headers, but they are only
used in the test and don't get installed.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 5b44d6f..c19494f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,9 +85,16 @@ protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ +protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header -c < $< > $@ + +protocol/%-client-protocol-core.h : $(top_srcdir)/protocol/%.xml + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header -c < $< > $@ + BUILT_SOURCES = \ $(nodist_libwayland_server_la_SOURCES) \ - $(nodist_libwayland_client_la_SOURCES) + $(nodist_libwayland_client_la_SOURCES) \ + $(nodist_headers_test_SOURCES) CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = src/wayland-version.h @@ -132,7 +139,8 @@ TESTS = \ queue-test \ signal-test \ resources-test \ - message-test + message-test \ + headers-test if ENABLE_CPP_TEST TESTS += cpp-compile-test @@ -188,6 +196,13 @@ resources_test_SOURCES = tests/resources-test.c resources_test_LDADD = libtest-runner.la message_test_SOURCES = tests/message-test.c message_test_LDADD = libtest-runner.la +headers_test_SOURCES = tests/headers-test.c \ + tests/headers-protocol-test.c \ + tests/headers-protocol-core-test.c +headers_test_LDADD = libtest-runner.la +nodist_headers_test_SOURCES = \ + protocol/wayland-server-protocol-core.h \ + protocol/wayland-client-protocol-core.h if ENABLE_CPP_TEST cpp_compile_test_SOURCES = tests/cpp-compile-test.cpp |