From 4e16c593782e65abeb53a6bff621146261127da0 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 4 Jan 2017 21:04:25 +0100 Subject: git-receiver: do not run blogc-make tests if blogc-make is not built --- configure.ac | 1 + tests/blogc-git-receiver/check_pre_receive.sh.in | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 8b3b44e..6e6b490 100644 --- a/configure.ac +++ b/configure.ac @@ -122,6 +122,7 @@ AS_IF([test "x$enable_make" = "xyes" -o "x$enable_make_embedded" = "xyes"], [ AM_CONDITIONAL([BUILD_MAKE], [test "x$have_make" = "xyes"]) AM_CONDITIONAL([BUILD_MAKE_LIB], [test "x$have_make_lib" = "xyes"]) AM_CONDITIONAL([BUILD_MAKE_EMBEDDED], [test "x$have_make_embedded" = "xyes"]) +AC_SUBST(MAKE_) RUNSERVER="disabled" AC_ARG_ENABLE([runserver], AS_HELP_STRING([--enable-runserver], diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index eff8691..e9181eb 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -171,11 +171,12 @@ HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./repos/foo3.git/hooks/pre-receive 2>&1 | te [[ "${DEST}" != "$(readlink repos/foo3.git/htdocs)" ]] [[ ! -e "${DEST}" ]] -cd "${TEMP}" -git init --bare "${TEMP}/repos/foo4.git" &> /dev/null -ln -s "${SELF}" "${TEMP}/repos/foo4.git/hooks/pre-receive" +if [[ "x@MAKE_@" == "xenabled" ]]; then + cd "${TEMP}" + git init --bare "${TEMP}/repos/foo4.git" &> /dev/null + ln -s "${SELF}" "${TEMP}/repos/foo4.git/hooks/pre-receive" -cat > "${TEMP}/tmp.txt" < "${TEMP}/tmp.txt" < /dev/null + cd "${TEMP}/repos/foo4.git" + git fast-import < "${TEMP}/tmp.txt" &> /dev/null -cat > "${TEMP}/payload.txt" < "${TEMP}/payload.txt" <&1 | tee "${TEMP}/output.txt" || true -grep "blogc-make: error: settings: " "${TEMP}/output.txt" &> /dev/null + SHELL="${SELF}" HOME="${TEMP}" PATH="@abs_top_builddir@:${PATH}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" || true + grep "blogc-make: error: settings: " "${TEMP}/output.txt" &> /dev/null +fi rm "${TEMP}/output.txt" -- cgit v1.2.3-18-g5258