6263: Skip re-installing virtualenv if it is already set up. Upgrade pip along with... 6263-gitolite-test
authorTom Clegg <tom@curoverse.com>
Wed, 2 Sep 2015 06:48:18 +0000 (02:48 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 2 Sep 2015 06:48:18 +0000 (02:48 -0400)
jenkins/run-tests.sh

index d1c9c9e747659aba26c6ddda3c2bd5741bc2325c..9ca70b86656ec56b9370731cfd23c81b0bee3466 100755 (executable)
@@ -392,11 +392,13 @@ mkdir -p "$GOPATH/src/git.curoverse.com"
 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" \
     || fatal "symlink failed"
 
-virtualenv --setuptools "$VENVDIR" || fatal "virtualenv $VENVDIR failed"
+if ! [[ -e "$VENVDIR/bin/activate" ]] || ! [[ -e "$VENVDIR/bin/pip" ]]; then
+    virtualenv --setuptools "$VENVDIR" || fatal "virtualenv $VENVDIR failed"
+fi
 . "$VENVDIR/bin/activate"
 
 if (pip install setuptools | grep setuptools-0) || [ "$($VENVDIR/bin/easy_install --version | cut -d\  -f2 | cut -d. -f1)" -lt 18 ]; then
-    pip install --upgrade setuptools
+    pip install --upgrade setuptools pip
 fi
 
 # Note: this must be the last time we change PATH, otherwise rvm will