diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-12 23:34:36 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-12 23:34:36 +0200 |
commit | 108e30d1964ae4739c722cede7ed7f26b226735e (patch) | |
tree | e340628c33b3b22f647206f6874a616d4d4a8897 | |
parent | de580e7999400b7d8789ce3747db4f2a63f2538b (diff) | |
download | blogc-108e30d1964ae4739c722cede7ed7f26b226735e.tar.gz blogc-108e30d1964ae4739c722cede7ed7f26b226735e.tar.bz2 blogc-108e30d1964ae4739c722cede7ed7f26b226735e.zip |
build: if tests not explicitly requested, avoid errors if deps not found
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index 8aed820..b524120 100644 --- a/Makefile.am +++ b/Makefile.am @@ -322,12 +322,14 @@ endif if BUILD_TESTS if BUILD_GIT_RECEIVER +if USE_BGR_DEPS check_SCRIPTS += \ tests/blogc-git-receiver/check_post_receive.sh \ tests/blogc-git-receiver/check_pre_receive.sh \ tests/blogc-git-receiver/check_shell.sh \ $(NULL) endif +endif if USE_CMOCKA diff --git a/configure.ac b/configure.ac index 4779308..9926099 100644 --- a/configure.ac +++ b/configure.ac @@ -116,8 +116,6 @@ TESTS="disabled" AC_ARG_ENABLE([tests], AS_HELP_STRING([--disable-tests], [disable unit tests, ignoring presence of cmocka])) AS_IF([test "x$enable_tests" != "xno"], [ - TESTS="enabled" - have_tests=yes PKG_CHECK_MODULES([CMOCKA], [cmocka], [ AC_MSG_CHECKING([whether the linker supports -wrap]) save_LDFLAGS="$LDFLAGS" @@ -153,12 +151,12 @@ AS_IF([test "x$enable_tests" != "xno"], [ have_blogc_deps=no ], [ have_blogc_deps=yes + have_tests=yes + TESTS="enabled" ]) -], [ - have_tests=no ]) -AS_IF([test "x$have_tests" = "xyes"], [ +AS_IF([test "x$enable_tests" = "xyes"], [ AS_IF([test "x$have_cmocka" = "xyes"],, [ AC_MSG_ERROR([tests requested but cmocka not found]) ]) |