1 EXTRA_DIST = \
2 coverage.sh \
3 integration/simple_config.sh \
4 integration/simple_query.sh \
5 integration/test_lib.sh \
6 valgrind.suppress
8 # coverage related flags are only set when gcov is enabled
9 AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
10 AM_LDFLAGS = @COVERAGE_LDFLAGS@
11 AM_CPPFLAGS = -I$(top_srcdir)/src/include
13 TESTS =
14 check_PROGRAMS =
15 check_LTLIBRARIES =
17 #
18 # unit tests
19 #
21 if UNIT_TESTING
22 TESTS += unit/libsysdb_test unit/libsysdb_net_test
23 check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
24 endif
26 unit_libsysdb_test_SOURCES = \
27 unit/libsysdb_test.c unit/libsysdb_test.h \
28 unit/libsysdb_testutils.c unit/libsysdb_testutils.h \
29 unit/core/data_test.c \
30 unit/core/object_test.c \
31 unit/core/store_test.c \
32 unit/core/store_lookup_test.c \
33 unit/core/time_test.c \
34 unit/frontend/connection_test.c \
35 unit/frontend/parser_test.c \
36 unit/frontend/sock_test.c \
37 unit/utils/avltree_test.c \
38 unit/utils/channel_test.c \
39 unit/utils/dbi_test.c \
40 unit/utils/llist_test.c \
41 unit/utils/os_test.c \
42 unit/utils/strbuf_test.c
43 unit_libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
44 unit_libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
46 unit_libsysdb_net_test_SOURCES = \
47 unit/libsysdb_net_test.c unit/libsysdb_test.h \
48 unit/libsysdb_testutils.c unit/libsysdb_testutils.h
49 if BUILD_WITH_FOPENCOOKIE
50 unit_libsysdb_net_test_SOURCES += unit/utils/unixsock_test.c
51 endif
52 unit_libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
53 unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
55 #
56 # integration tests
57 #
59 if INTEGRATION_TESTING
60 TESTS += integration/simple_config.sh integration/simple_query.sh
61 endif
63 check_LTLIBRARIES += integration/mock_plugin.la
64 integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
65 # -rpath is a work-around to enforce a shared library
66 integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
67 -rpath /nonexistent
69 test: check