Code

build system: Disable integration tests if valgrind or chrpath are missing.
[sysdb.git] / t / Makefile.am
index 504e88c957be3f5e37aa0e745614b1a20054d460..bfeadcfc13d7cab9485c6ae20eaa310b99f46e1e 100644 (file)
@@ -1,4 +1,8 @@
-EXTRA_DIST = coverage.sh
+EXTRA_DIST = \
+               coverage.sh \
+               integration/simple_config.sh \
+               integration/simple_query.sh \
+               integration/test_lib.sh
 
 # coverage related flags are only set when gcov is enabled
 AM_CFLAGS = @STRICT_CFLAGS@ @COVERAGE_CFLAGS@
@@ -7,13 +11,16 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include
 
 TESTS =
 check_PROGRAMS =
+noinst_LTLIBRARIES =
 
 #
 # unit tests
 #
 
+if UNIT_TESTING
 TESTS += unit/libsysdb_test unit/libsysdb_net_test
 check_PROGRAMS += unit/libsysdb_test unit/libsysdb_net_test
+endif
 
 unit_libsysdb_test_SOURCES = \
                unit/libsysdb_test.c unit/libsysdb_test.h \
@@ -46,7 +53,15 @@ unit_libsysdb_net_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
 # integration tests
 #
 
-TESTS += integration/simple_config.sh
+if INTEGRATION_TESTING
+TESTS += integration/simple_config.sh integration/simple_query.sh
+endif
+
+noinst_LTLIBRARIES += integration/mock_plugin.la
+integration_mock_plugin_la_SOURCES = integration/mock_plugin.c
+# -rpath is a work-around to enforce a shared library
+integration_mock_plugin_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \
+               -rpath /nonexistent
 
 test: check