Put requirements repo in a venv.

This is to prevent any possible contamination of test results from its
presence.

Change-Id: I5a929854745650cc6a182ffc4d15c50caabdd727
diff --git a/lib/infra b/lib/infra
index 5fb185f..4cc2596 100644
--- a/lib/infra
+++ b/lib/infra
@@ -29,6 +29,8 @@
 
 # install_infra() - Collect source and prepare
 function install_infra {
+    local PIP_VIRTUAL_ENV="$REQUIREMENTS_DIR/.venv"
+
     # Install pbr
     if use_library_from_git "pbr"; then
         git_clone_by_name "pbr"
@@ -41,7 +43,9 @@
 
     # bring down global requirements
     git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
-    pip_install $REQUIREMENTS_DIR
+    [ ! -d $PIP_VIRTUAL_ENV ] && virtualenv $PIP_VIRTUAL_ENV
+    PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install -U pbr
+    PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install $REQUIREMENTS_DIR
 }
 
 # Restore xtrace