diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-08-20 21:46:14 +0200 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-08-20 21:46:14 +0200 |
| commit | 5210956278e8d0bd4e5676fc116851626ac89491 (patch) | |
| tree | 5b137c5474732d238b6e4eaf03cc133ef63c29bb | |
| parent | 022a0f68764c60fb6a2fd7493d511438037cbd53 (diff) | |
| download | gitlab-5210956278e8d0bd4e5676fc116851626ac89491.tar.gz | |
[tests] Use -n to not use a venv
| -rwxr-xr-x | tools/build_test_env.sh | 20 |
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 |
