Code

t/Makefile: Drop unused, old frontend/parser_test.
[sysdb.git] / t / Makefile.am
1 EXTRA_DIST = \
2                 coverage.sh \
3                 testwrapper.sh \
4                 integration/client.sh \
5                 integration/config.sh \
6                 integration/ssl.sh \
7                 integration/query_fetch.sh \
8                 integration/query_list.sh \
9                 integration/query_timeseries.sh \
10                 integration/matching.sh \
11                 integration/filter.sh \
12                 integration/test_lib.sh \
13                 valgrind.suppress
15 # coverage related flags are only set when gcov is enabled
16 AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
17 AM_LDFLAGS = @COVERAGE_LDFLAGS@
18 AM_CPPFLAGS = -I$(top_builddir)/src/include \
19                 -I$(top_srcdir)/src/include -I$(top_srcdir)/src
21 TESTS =
22 check_PROGRAMS =
23 check_LTLIBRARIES =
25 #
26 # unit tests
27 #
29 LOG_COMPILER = env VPATH=$(VPATH) $(abs_srcdir)/testwrapper.sh
31 if UNIT_TESTING
32 UNIT_TESTS = \
33                 unit/core/data_test \
34                 unit/core/object_test \
35                 unit/core/store_expr_test \
36                 unit/core/store_json_test \
37                 unit/core/store_lookup_test \
38                 unit/core/store_test \
39                 unit/core/time_test \
40                 unit/frontend/connection_test \
41                 unit/frontend/query_test \
42                 unit/frontend/sock_test \
43                 unit/parser/ast_test \
44                 unit/parser/ast_test \
45                 unit/parser/parser_test \
46                 unit/utils/avltree_test \
47                 unit/utils/channel_test \
48                 unit/utils/dbi_test \
49                 unit/utils/llist_test \
50                 unit/utils/os_test \
51                 unit/utils/proto_test \
52                 unit/utils/strbuf_test
54 UNIT_TEST_SOURCES = unit/testutils.c unit/testutils.h
55 UNIT_TEST_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
56 UNIT_TEST_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
58 if BUILD_WITH_FOPENCOOKIE
59 UNIT_TESTS += unit/utils/unixsock_test
60 unit_utils_unixsock_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/unixsock_test.c
61 unit_utils_unixsock_test_CFLAGS = $(UNIT_TEST_CFLAGS)
62 unit_utils_unixsock_test_LDADD = $(UNIT_TEST_LDADD)
63 endif
65 unit_core_data_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/data_test.c
66 unit_core_data_test_CFLAGS = $(UNIT_TEST_CFLAGS)
67 unit_core_data_test_LDADD = $(UNIT_TEST_LDADD)
69 unit_core_object_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/object_test.c
70 unit_core_object_test_CFLAGS = $(UNIT_TEST_CFLAGS)
71 unit_core_object_test_LDADD = $(UNIT_TEST_LDADD)
73 unit_core_store_expr_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/store_expr_test.c
74 unit_core_store_expr_test_CFLAGS = $(UNIT_TEST_CFLAGS)
75 unit_core_store_expr_test_LDADD = $(UNIT_TEST_LDADD)
77 unit_core_store_json_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/store_json_test.c
78 unit_core_store_json_test_CFLAGS = $(UNIT_TEST_CFLAGS)
79 unit_core_store_json_test_LDADD = $(UNIT_TEST_LDADD)
81 unit_core_store_lookup_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/store_lookup_test.c
82 unit_core_store_lookup_test_CFLAGS = $(UNIT_TEST_CFLAGS)
83 unit_core_store_lookup_test_LDADD = $(UNIT_TEST_LDADD)
85 unit_core_store_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/store_test.c
86 unit_core_store_test_CFLAGS = $(UNIT_TEST_CFLAGS)
87 unit_core_store_test_LDADD = $(UNIT_TEST_LDADD)
89 unit_core_time_test_SOURCES = $(UNIT_TEST_SOURCES) unit/core/time_test.c
90 unit_core_time_test_CFLAGS = $(UNIT_TEST_CFLAGS)
91 unit_core_time_test_LDADD = $(UNIT_TEST_LDADD)
93 unit_frontend_connection_test_SOURCES = $(UNIT_TEST_SOURCES) unit/frontend/connection_test.c
94 unit_frontend_connection_test_CFLAGS = $(UNIT_TEST_CFLAGS)
95 unit_frontend_connection_test_LDADD = $(UNIT_TEST_LDADD)
97 unit_frontend_query_test_SOURCES = $(UNIT_TEST_SOURCES) unit/frontend/query_test.c
98 unit_frontend_query_test_CFLAGS = $(UNIT_TEST_CFLAGS)
99 unit_frontend_query_test_LDADD = $(UNIT_TEST_LDADD)
101 unit_frontend_sock_test_SOURCES = $(UNIT_TEST_SOURCES) unit/frontend/sock_test.c
102 unit_frontend_sock_test_CFLAGS = $(UNIT_TEST_CFLAGS)
103 unit_frontend_sock_test_LDADD = $(UNIT_TEST_LDADD)
105 unit_parser_ast_test_SOURCES = $(UNIT_TEST_SOURCES) unit/parser/ast_test.c
106 unit_parser_ast_test_CFLAGS = $(UNIT_TEST_CFLAGS)
107 unit_parser_ast_test_LDADD = $(UNIT_TEST_LDADD)
109 unit_parser_parser_test_SOURCES = $(UNIT_TEST_SOURCES) unit/parser/parser_test.c
110 unit_parser_parser_test_CFLAGS = $(UNIT_TEST_CFLAGS)
111 unit_parser_parser_test_LDADD = $(UNIT_TEST_LDADD)
113 unit_utils_avltree_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/avltree_test.c
114 unit_utils_avltree_test_CFLAGS = $(UNIT_TEST_CFLAGS)
115 unit_utils_avltree_test_LDADD = $(UNIT_TEST_LDADD)
117 unit_utils_channel_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/channel_test.c
118 unit_utils_channel_test_CFLAGS = $(UNIT_TEST_CFLAGS)
119 unit_utils_channel_test_LDADD = $(UNIT_TEST_LDADD)
121 unit_utils_dbi_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/dbi_test.c
122 unit_utils_dbi_test_CFLAGS = $(UNIT_TEST_CFLAGS)
123 unit_utils_dbi_test_LDADD = $(UNIT_TEST_LDADD)
125 unit_utils_llist_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/llist_test.c
126 unit_utils_llist_test_CFLAGS = $(UNIT_TEST_CFLAGS)
127 unit_utils_llist_test_LDADD = $(UNIT_TEST_LDADD)
129 unit_utils_os_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/os_test.c
130 unit_utils_os_test_CFLAGS = $(UNIT_TEST_CFLAGS)
131 unit_utils_os_test_LDADD = $(UNIT_TEST_LDADD)
133 unit_utils_proto_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/proto_test.c
134 unit_utils_proto_test_CFLAGS = $(UNIT_TEST_CFLAGS)
135 unit_utils_proto_test_LDADD = $(UNIT_TEST_LDADD)
137 unit_utils_strbuf_test_SOURCES = $(UNIT_TEST_SOURCES) unit/utils/strbuf_test.c
138 unit_utils_strbuf_test_CFLAGS = $(UNIT_TEST_CFLAGS)
139 unit_utils_strbuf_test_LDADD = $(UNIT_TEST_LDADD)
141 TESTS += $(UNIT_TESTS)
142 check_PROGRAMS += $(UNIT_TESTS)
143 endif
146 # integration tests
149 if INTEGRATION_TESTING
150 INTEGRATION_TESTS = \
151                 integration/client.sh \
152                 integration/config.sh \
153                 integration/ssl.sh \
154                 integration/query_fetch.sh \
155                 integration/query_list.sh \
156                 integration/query_timeseries.sh \
157                 integration/matching.sh \
158                 integration/filter.sh
160 TESTS += $(INTEGRATION_TESTS)
162 check_LTLIBRARIES += integration/mock_plugin.la
163 integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
164 # -rpath is a work-around to enforce a shared library
165 integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
166                 -rpath /nonexistent
168 check_LTLIBRARIES += integration/mock_timeseries.la
169 integration_mock_timeseries_la_SOURCES = integration/mock_timeseries.c
170 # -rpath is a work-around to enforce a shared library
171 integration_mock_timeseries_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
172                 -rpath /nonexistent
173 endif
175 test: check