Code

t/: Always use testwrapper.sh for running tests.
[sysdb.git] / t / Makefile.am
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 LOG_COMPILER = $(abs_srcdir)/testwrapper.sh
23 if UNIT_TESTING
24 TESTS += unit/libsysdb_test unit/libsysdb_net_test
25 check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
26 endif
28 unit_libsysdb_test_SOURCES = \
29                 unit/libsysdb_test.c unit/libsysdb_test.h \
30                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h \
31                 unit/core/data_test.c \
32                 unit/core/object_test.c \
33                 unit/core/store_test.c \
34                 unit/core/store_lookup_test.c \
35                 unit/core/time_test.c \
36                 unit/frontend/connection_test.c \
37                 unit/frontend/parser_test.c \
38                 unit/frontend/sock_test.c \
39                 unit/utils/avltree_test.c \
40                 unit/utils/channel_test.c \
41                 unit/utils/dbi_test.c \
42                 unit/utils/llist_test.c \
43                 unit/utils/os_test.c \
44                 unit/utils/strbuf_test.c
45 unit_libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
46 unit_libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
48 unit_libsysdb_net_test_SOURCES = \
49                 unit/libsysdb_net_test.c unit/libsysdb_test.h \
50                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h
51 if BUILD_WITH_FOPENCOOKIE
52 unit_libsysdb_net_test_SOURCES += unit/utils/unixsock_test.c
53 endif
54 unit_libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
55 unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
57 #
58 # integration tests
59 #
61 if INTEGRATION_TESTING
62 TESTS += integration/simple_config.sh integration/simple_query.sh
63 endif
65 check_LTLIBRARIES += integration/mock_plugin.la
66 integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
67 # -rpath is a work-around to enforce a shared library
68 integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
69                 -rpath /nonexistent
71 test: check