diff --git a/jenkins/acceptance.sh b/jenkins/acceptance.sh index 52a29bcdd5..8bcaa209ff 100755 --- a/jenkins/acceptance.sh +++ b/jenkins/acceptance.sh @@ -54,6 +54,13 @@ git fetch origin master:refs/remotes/origin/master # Bootstrap Ruby requirements so we can run the tests bundle install +# Reset the jenkins worker's virtualenv back to the +# state it was in when the instance was spun up. +if [ -e $HOME/edx-venv_clean.tar.gz ]; then + rm -rf $HOME/edx-venv + tar -C $HOME -xf $HOME/edx-venv_clean.tar.gz +fi + # Activate the Python virtualenv source $HOME/edx-venv/bin/activate diff --git a/jenkins/all-tests.sh b/jenkins/all-tests.sh index b4706229f4..7d0bf8720c 100755 --- a/jenkins/all-tests.sh +++ b/jenkins/all-tests.sh @@ -62,6 +62,13 @@ git fetch origin master:refs/remotes/origin/master # Bootstrap Ruby requirements so we can run the tests bundle install +# Reset the jenkins worker's virtualenv back to the +# state it was in when the instance was spun up. +if [ -e $HOME/edx-venv_clean.tar.gz ]; then + rm -rf $HOME/edx-venv + tar -C $HOME -xf $HOME/edx-venv_clean.tar.gz +fi + # Activate the Python virtualenv source $HOME/edx-venv/bin/activate