aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-git-receiver/check_pre_receive.sh.in
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-01-04 21:04:25 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-01-04 21:04:25 +0100
commit4e16c593782e65abeb53a6bff621146261127da0 (patch)
treeff33ab09d7e5aaf1ce068c24b004c5a08b751d66 /tests/blogc-git-receiver/check_pre_receive.sh.in
parentb2fd258d6285e882698ac5876345b9b27a0f4d4f (diff)
downloadblogc-4e16c593782e65abeb53a6bff621146261127da0.tar.gz
blogc-4e16c593782e65abeb53a6bff621146261127da0.tar.bz2
blogc-4e16c593782e65abeb53a6bff621146261127da0.zip
git-receiver: do not run blogc-make tests if blogc-make is not built
Diffstat (limited to 'tests/blogc-git-receiver/check_pre_receive.sh.in')
-rwxr-xr-xtests/blogc-git-receiver/check_pre_receive.sh.in20
1 files changed, 11 insertions, 9 deletions
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" <<EOF
+ cat > "${TEMP}/tmp.txt" <<EOF
blob
mark :1
data 0
@@ -191,14 +192,15 @@ M 100644 :1 blogcfile
EOF
-cd "${TEMP}/repos/foo4.git"
-git fast-import < "${TEMP}/tmp.txt" &> /dev/null
+ cd "${TEMP}/repos/foo4.git"
+ git fast-import < "${TEMP}/tmp.txt" &> /dev/null
-cat > "${TEMP}/payload.txt" <<EOF
+ cat > "${TEMP}/payload.txt" <<EOF
0000000000000000000000000000000000000000 $(git rev-parse HEAD) refs/heads/master
EOF
-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
+ 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"