From de580e7999400b7d8789ce3747db4f2a63f2538b Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 12 Oct 2016 02:44:25 +0200 Subject: build: use bash, but get it properly during build time hardcoding it for travis, as bash is always installed there. --- tests/blogc-git-receiver/check_shell.sh | 73 --------------------------------- 1 file changed, 73 deletions(-) delete mode 100755 tests/blogc-git-receiver/check_shell.sh (limited to 'tests/blogc-git-receiver/check_shell.sh') diff --git a/tests/blogc-git-receiver/check_shell.sh b/tests/blogc-git-receiver/check_shell.sh deleted file mode 100755 index f563c02..0000000 --- a/tests/blogc-git-receiver/check_shell.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -set -xe -o pipefail - -export LC_ALL=C - -TEMP="$(mktemp -d)" -[[ -n "${TEMP}" ]] - -trap_func() { - [[ -e "${TEMP}/output.txt" ]] && cat "${TEMP}/output.txt" - [[ -n "${TEMP}" ]] && rm -rf "${TEMP}" -} - -trap trap_func EXIT - -SELF="${PWD}/blogc-git-receiver" - -call_bgr() { - [[ -n "${VALGRIND}" ]] && export __VALGRIND_ENABLED=1 - SHELL="${SELF}" HOME="${TEMP}" ${TESTS_ENVIRONMENT} "${SELF}" "$@" -} - -call_bgr -c "bola 'lol.git'" 2>&1 | tee "${TEMP}/output.txt" || true -grep "error: invalid git-shell command: bola 'lol\.git'" "${TEMP}/output.txt" &> /dev/null - -echo 0000 | call_bgr -c "git-receive-pack 'lol.git'" 2>&1 > "${TEMP}/output.txt" -if [[ -n "${VALGRIND}" ]]; then - grep "git-shell -c \"git-receive-pack '.*repos/lol.git'\"" "${TEMP}/output.txt" &> /dev/null -else - grep "agent=" "${TEMP}/output.txt" &> /dev/null -fi -[[ -d "${TEMP}/repos/lol.git" ]] -[[ -h "${TEMP}/repos/lol.git/hooks/pre-receive" ]] -[[ "$(readlink "${TEMP}/repos/lol.git/hooks/pre-receive")" == "${SELF}" ]] -[[ -h "${TEMP}/repos/lol.git/hooks/post-receive" ]] -[[ "$(readlink "${TEMP}/repos/lol.git/hooks/post-receive")" == "${SELF}" ]] - -cat > "${TEMP}/tmp.txt" < 1476033730 +0200 -committer Rafael G. Martins 1476033888 +0200 -data 11 -testing... -M 100644 :1 foo - -EOF -cd "${TEMP}/repos/lol.git" -git fast-import < "${TEMP}/tmp.txt" &> /dev/null -cd - > /dev/null - -echo 0000 | call_bgr -c "git-upload-pack 'lol.git'" 2>&1 > "${TEMP}/output.txt" -if [[ -n "${VALGRIND}" ]]; then - grep "git-shell -c \"git-upload-pack '.*repos/lol.git'\"" "${TEMP}/output.txt" &> /dev/null -else - grep "agent=" "${TEMP}/output.txt" &> /dev/null -fi - -echo 0000 | call_bgr -c "git-upload-archive 'lol.git'" 2>&1 > "${TEMP}/output.txt" || true -if [[ -n "${VALGRIND}" ]]; then - grep "git-shell -c \"git-upload-archive '.*repos/lol.git'\"" "${TEMP}/output.txt" &> /dev/null -else - grep "ACK" "${TEMP}/output.txt" &> /dev/null -fi - -rm "${TEMP}/output.txt" -- cgit v1.2.3-18-g5258