exit 1
fi
-# site packages needed because libvirt python bindings are not nicely
-# packaged
-virtualenv --system-site-packages --distribute virtualenv
+if [ -z "$NO_CLOBBER" ] || [ ! -e ./virtualenv ]; then
+ # site packages needed because libvirt python bindings are not nicely
+ # packaged
+ virtualenv --system-site-packages --distribute virtualenv
-# avoid pip bugs
-./virtualenv/bin/pip install --upgrade pip
+ # avoid pip bugs
+ ./virtualenv/bin/pip install --upgrade pip
+fi
./virtualenv/bin/pip install -r requirements.txt
subprocess.Popen(('git', 'reset', '--hard', 'origin/%s' %
teuthology_branch), cwd=teuth_path)
log.info("Bootstrapping %s", teuth_path)
- subprocess.Popen(('./bootstrap'), cwd=teuth_path)
+ # This magic makes the bootstrap script not attempt to clobber an
+ # existing virtualenv.
+ env = os.environ.copy()
+ env['NO_CLOBBER'] = '1'
+ subprocess.Popen(('./bootstrap'), cwd=teuth_path, env)
teuth_bin_path = os.path.join(teuth_path, 'virtualenv', 'bin')
if not os.path.isdir(teuth_bin_path):
raise RuntimeError('Teuthology branch %s not found at %s' %