diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-11-17 23:34:27 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-11-17 23:34:27 +0100 |
commit | 0db557041908b483ec77439bb5e1db982464d327 (patch) | |
tree | 9aa25afb81bc6a9545723aa93e839767ef0989b9 /tests | |
parent | fc52952914747dc937c805baa211a251a795b847 (diff) | |
download | blogc-0db557041908b483ec77439bb5e1db982464d327.tar.gz blogc-0db557041908b483ec77439bb5e1db982464d327.tar.bz2 blogc-0db557041908b483ec77439bb5e1db982464d327.zip |
git-receiver: when rebuilding, change to repo dir asap
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/blogc-git-receiver/check_pre_receive.sh.in | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index b9aec45..d70e04a 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -151,12 +151,24 @@ HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/outp [[ "${DEST}" != "$(readlink htdocs)" ]] [[ ! -e "${DEST}" ]] -DEST="$(readlink htdocs)" -HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt" +cd .. -[[ -h htdocs ]] -[[ "$(cat htdocs/foo.txt)" == "lol" ]] -[[ "${DEST}" != "$(readlink htdocs)" ]] +DEST="$(readlink foo3.git/htdocs)" +HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./foo3.git/hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt" + +[[ -h foo3.git/htdocs ]] +[[ "$(cat foo3.git/htdocs/foo.txt)" == "lol" ]] +[[ "${DEST}" != "$(readlink foo3.git/htdocs)" ]] +[[ ! -e "${DEST}" ]] + +cd .. + +DEST="$(readlink repos/foo3.git/htdocs)" +HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./repos/foo3.git/hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt" + +[[ -h repos/foo3.git/htdocs ]] +[[ "$(cat repos/foo3.git/htdocs/foo.txt)" == "lol" ]] +[[ "${DEST}" != "$(readlink repos/foo3.git/htdocs)" ]] [[ ! -e "${DEST}" ]] rm "${TEMP}/output.txt" |