ci: allow opting out of push-options tests

The push-options online tests require push options support in the git
itself that's on the system. Allow callers with old git to opt out.
This commit is contained in:
Edward Thomson
2024-02-29 18:24:38 +00:00
parent cc35d987b4
commit 1a3d6a8893
2 changed files with 6 additions and 10 deletions

View File

@@ -40,6 +40,7 @@ runs:
-e PKG_CONFIG_PATH \
-e SKIP_NEGOTIATE_TESTS \
-e SKIP_SSH_TESTS \
-e SKIP_PUSHOPTIONS_TESTS \
-e TSAN_OPTIONS \
-e UBSAN_OPTIONS \
${{ inputs.container-version }} \

View File

@@ -18,6 +18,11 @@ if [[ "$(uname -s)" == MINGW* ]]; then
SKIP_NTLM_TESTS=1
fi
# older versions of git don't support push options
if [ -z "$SKIP_PUSHOPTIONS_TESTS" ]; then
export GITTEST_PUSH_OPTIONS=true
fi
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
BUILD_DIR=$(pwd)
BUILD_PATH=${BUILD_PATH:=$PATH}
@@ -324,10 +329,8 @@ if should_run "GITDAEMON_TESTS"; then
echo ""
export GITTEST_REMOTE_URL="git://localhost/test.git"
export GITTEST_PUSH_OPTIONS=true
run_test gitdaemon
unset GITTEST_REMOTE_URL
unset GITTEST_PUSH_OPTIONS
echo ""
echo "Running gitdaemon (namespace) tests"
@@ -382,12 +385,10 @@ if should_run "NTLM_TESTS"; then
export GITTEST_REMOTE_URL="http://localhost:9000/ntlm/test.git"
export GITTEST_REMOTE_USER="foo"
export GITTEST_REMOTE_PASS="baz"
export GITTEST_PUSH_OPTIONS=true
run_test auth_clone_and_push
unset GITTEST_REMOTE_URL
unset GITTEST_REMOTE_USER
unset GITTEST_REMOTE_PASS
unset GITTEST_PUSH_OPTIONS
echo ""
echo "Running NTLM tests (Apache emulation)"
@@ -396,12 +397,10 @@ if should_run "NTLM_TESTS"; then
export GITTEST_REMOTE_URL="http://localhost:9000/broken-ntlm/test.git"
export GITTEST_REMOTE_USER="foo"
export GITTEST_REMOTE_PASS="baz"
export GITTEST_PUSH_OPTIONS=true
run_test auth_clone_and_push
unset GITTEST_REMOTE_URL
unset GITTEST_REMOTE_USER
unset GITTEST_REMOTE_PASS
unset GITTEST_PUSH_OPTIONS
fi
if should_run "NEGOTIATE_TESTS" && -n "$GITTEST_NEGOTIATE_PASSWORD" ; then
@@ -451,20 +450,16 @@ if should_run "SSH_TESTS"; then
echo ""
export GITTEST_REMOTE_URL="ssh://localhost:2222/$SSHD_DIR/test.git"
export GITTEST_PUSH_OPTIONS=true
run_test ssh
unset GITTEST_REMOTE_URL
unset GITTEST_PUSH_OPTIONS
echo ""
echo "Running ssh tests (scp-style paths)"
echo ""
export GITTEST_REMOTE_URL="[localhost:2222]:$SSHD_DIR/test.git"
export GITTEST_PUSH_OPTIONS=true
run_test ssh
unset GITTEST_REMOTE_URL
unset GITTEST_PUSH_OPTIONS
unset GITTEST_SSH_CMD