Code

build system: Disable integration tests if valgrind or chrpath are missing.
[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
7 # coverage related flags are only set when gcov is enabled
8 AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
9 AM_LDFLAGS = @COVERAGE_LDFLAGS@
10 AM_CPPFLAGS = -I$(top_srcdir)/src/include
12 TESTS =
13 check_PROGRAMS =
14 noinst_LTLIBRARIES =
16 #
17 # unit tests
18 #
20 if UNIT_TESTING
21 TESTS += unit/libsysdb_test unit/libsysdb_net_test
22 check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
23 endif
25 unit_libsysdb_test_SOURCES = \
26                 unit/libsysdb_test.c unit/libsysdb_test.h \
27                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h \
28                 unit/core/data_test.c \
29                 unit/core/object_test.c \
30                 unit/core/store_test.c \
31                 unit/core/store_lookup_test.c \
32                 unit/core/time_test.c \
33                 unit/frontend/connection_test.c \
34                 unit/frontend/parser_test.c \
35                 unit/frontend/sock_test.c \
36                 unit/utils/channel_test.c \
37                 unit/utils/dbi_test.c \
38                 unit/utils/llist_test.c \
39                 unit/utils/strbuf_test.c
40 unit_libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
41 unit_libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
43 unit_libsysdb_net_test_SOURCES = \
44                 unit/libsysdb_net_test.c unit/libsysdb_test.h \
45                 unit/libsysdb_testutils.c unit/libsysdb_testutils.h
46 if BUILD_WITH_FOPENCOOKIE
47 unit_libsysdb_net_test_SOURCES += unit/utils/unixsock_test.c
48 endif
49 unit_libsysdb_net_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@ -I$(top_srcdir)/t/unit
50 unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
52 #
53 # integration tests
54 #
56 if INTEGRATION_TESTING
57 TESTS += integration/simple_config.sh integration/simple_query.sh
58 endif
60 noinst_LTLIBRARIES += integration/mock_plugin.la
61 integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
62 # -rpath is a work-around to enforce a shared library
63 integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
64                 -rpath /nonexistent
66 test: check