Code

8fccbd222174ecd149c796e6d9abdbf83ec9dbca
[sysdb.git] / t / Makefile.am
1 EXTRA_DIST = \
2                 coverage.sh \
3                 testwrapper.sh \
4                 integration/config.sh \
5                 integration/ssl.sh \
6                 integration/query.sh \
7                 integration/matching.sh \
8                 integration/filter.sh \
9                 integration/test_lib.sh \
10                 valgrind.suppress
12 # coverage related flags are only set when gcov is enabled
13 AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
14 AM_LDFLAGS = @COVERAGE_LDFLAGS@
15 AM_CPPFLAGS = -I$(top_srcdir)/src/include
17 TESTS =
18 check_PROGRAMS =
19 check_LTLIBRARIES =
21 #
22 # unit tests
23 #
25 LOG_COMPILER = $(abs_srcdir)/testwrapper.sh
27 if UNIT_TESTING
28 TESTS += unit/libsysdb_test unit/libsysdb_net_test
29 check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
30 endif
32 unit_libsysdb_test_SOURCES = \
33                 unit/libsysdb_test.c unit/libsysdb_test.h \
34                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h \
35                 unit/core/data_test.c \
36                 unit/core/object_test.c \
37                 unit/core/store_test.c \
38                 unit/core/store_json_test.c \
39                 unit/core/store_lookup_test.c \
40                 unit/core/time_test.c \
41                 unit/frontend/connection_test.c \
42                 unit/frontend/parser_test.c \
43                 unit/frontend/sock_test.c \
44                 unit/frontend/query_test.c \
45                 unit/utils/avltree_test.c \
46                 unit/utils/channel_test.c \
47                 unit/utils/dbi_test.c \
48                 unit/utils/llist_test.c \
49                 unit/utils/os_test.c \
50                 unit/utils/proto_test.c \
51                 unit/utils/strbuf_test.c
52 unit_libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
53 unit_libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
55 unit_libsysdb_net_test_SOURCES = \
56                 unit/libsysdb_net_test.c unit/libsysdb_test.h \
57                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h
58 if BUILD_WITH_FOPENCOOKIE
59 unit_libsysdb_net_test_SOURCES += unit/utils/unixsock_test.c
60 endif
61 unit_libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
62 unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
64 #
65 # integration tests
66 #
68 if INTEGRATION_TESTING
69 TESTS += \
70                 integration/config.sh \
71                 integration/ssl.sh \
72                 integration/query.sh \
73                 integration/matching.sh \
74                 integration/filter.sh
75 endif
77 check_LTLIBRARIES += integration/mock_plugin.la
78 integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
79 # -rpath is a work-around to enforce a shared library
80 integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
81                 -rpath /nonexistent
83 check_LTLIBRARIES += integration/mock_timeseries.la
84 integration_mock_timeseries_la_SOURCES = integration/mock_timeseries.c
85 # -rpath is a work-around to enforce a shared library
86 integration_mock_timeseries_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
87                 -rpath /nonexistent
89 test: check