summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-08-20 21:46:14 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-08-20 21:46:14 +0200
commit5210956278e8d0bd4e5676fc116851626ac89491 (patch)
tree5b137c5474732d238b6e4eaf03cc133ef63c29bb
parent022a0f68764c60fb6a2fd7493d511438037cbd53 (diff)
downloadgitlab-5210956278e8d0bd4e5676fc116851626ac89491.tar.gz
[tests] Use -n to not use a venv
-rwxr-xr-xtools/build_test_env.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh
index 35a54c6..572a47c 100755
--- a/tools/build_test_env.sh
+++ b/tools/build_test_env.sh
@@ -25,10 +25,12 @@ error() { log "ERROR: $@" >&2; }
fatal() { error "$@"; exit 1; }
try() { "$@" || fatal "'$@' failed"; }
+NOVENV=
PY_VER=2
API_VER=3
-while getopts :p:a: opt "$@"; do
+while getopts :np:a: opt "$@"; do
case $opt in
+ n) NOVENV=1;;
p) PY_VER=$OPTARG;;
a) API_VER=$OPTARG;;
:) fatal "Option -${OPTARG} requires a value";;
@@ -143,15 +145,17 @@ EOF
log "Config file content ($CONFIG):"
log <$CONFIG
-log "Creating Python virtualenv..."
-try "$VENV_CMD" "$VENV"
-. "$VENV"/bin/activate || fatal "failed to activate Python virtual environment"
+if [ -z "$NOVENV" ]; then
+ log "Creating Python virtualenv..."
+ try "$VENV_CMD" "$VENV"
+ . "$VENV"/bin/activate || fatal "failed to activate Python virtual environment"
-log "Installing dependencies into virtualenv..."
-try pip install -rrequirements.txt
+ log "Installing dependencies into virtualenv..."
+ try pip install -rrequirements.txt
-log "Installing into virtualenv..."
-try pip install -e .
+ log "Installing into virtualenv..."
+ try pip install -e .
+fi
log "Pausing to give GitLab some time to finish starting up..."
sleep 30