Skip to content

Commit 2609cbb

Browse files
committed
add more log messages
1 parent 37f6d42 commit 2609cbb

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tools/build_test_env.sh

+15-1
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,15 @@ CONFIG=/tmp/python-gitlab.cfg
5555

5656
cleanup() {
5757
rm -f "${CONFIG}"
58+
log "Killing gitlab-test docker container..."
5859
docker kill gitlab-test >/dev/null 2>&1
60+
log "Removing gitlab-test docker container..."
5961
docker rm gitlab-test >/dev/null 2>&1
62+
log "Deactivating Python virtualenv..."
6063
command -v deactivate >/dev/null 2>&1 && deactivate || true
64+
log "Deleting python virtualenv..."
6165
rm -rf "$VENV"
66+
log "Done."
6267
}
6368
[ -z "${BUILD_TEST_ENV_AUTO_CLEANUP+set}" ] || {
6469
trap cleanup EXIT
@@ -91,11 +96,12 @@ while :; do
9196
curl -s http://localhost:8080/users/sign_in 2>/dev/null \
9297
| grep -q "GitLab Community Edition" && break
9398
I=$((I+5))
94-
[ "$I" -eq 120 ] && exit 1
99+
[ "$I" -lt 120 ] || fatal "timed out"
95100
done
96101
sleep 5
97102

98103
# Get the token
104+
log "Getting GitLab token..."
99105
TOKEN_JSON=$(
100106
try curl -s http://localhost:8080/api/v3/session \
101107
-X POST \
@@ -120,9 +126,17 @@ EOF
120126
log "Config file content ($CONFIG):"
121127
log <$CONFIG
122128

129+
log "Creating Python virtualenv..."
123130
try "$VENV_CMD" "$VENV"
124131
. "$VENV"/bin/activate || fatal "failed to activate Python virtual environment"
132+
133+
log "Installing dependencies into virtualenv..."
125134
try pip install -rrequirements.txt
135+
136+
log "Installing into virtualenv..."
126137
try pip install -e .
127138

139+
log "Pausing to give GitLab some time to finish starting up..."
128140
sleep 20
141+
142+
log "Test environment initialized."

0 commit comments

Comments
 (0)