tests: fail 'make check' immediately without running the tests if debug is disabled
authorAlexander Kanavin <alexander.kanavin@intel.com>
Tue, 25 Jun 2013 17:33:42 +0000 (20:33 +0300)
committerAlexander Kanavin <alexander.kanavin@intel.com>
Tue, 25 Jun 2013 17:33:42 +0000 (20:33 +0300)
configure.ac
test/Makefile.am

index 7c78167..a2cb769 100644 (file)
@@ -118,6 +118,8 @@ fi
 AM_CONDITIONAL(USE_GTESTDBUS, [test x$gtestdbus = xyes])
 AC_SUBST(MESSAGE_BUS_TYPE, [$enable_dbus_type])
 
+AM_CONDITIONAL(HAVE_DEBUG, [test x$enable_debug = xyes])
+
 AC_SUBST(DBUS_SERVICES_DIR)
 AC_SUBST(DBUS_INTERFACES_DIR)
 
index efbc92a..7a4a95e 100644 (file)
@@ -1,4 +1,12 @@
+if HAVE_DEBUG
 SUBDIRS = common daemon db plugins
+else
+SUBDIRS =
+
+check-local:
+       @echo "ERROR: tests are enabled only if ./configure is run with --enable-debug"
+       @exit 1
+endif
 
 VALGRIND_TESTS_DISABLE =
 valgrind: $(SUBDIRS)
@@ -8,4 +16,4 @@ valgrind: $(SUBDIRS)
 
 EXTRA_DIST = \
     valgrind.supp \
-    valgrind_common.mk 
\ No newline at end of file
+    valgrind_common.mk