From 351959b0014463f9728f8ae64ccee9ae55d70a17 Mon Sep 17 00:00:00 2001
From: Michael Johnson <johnsomor@gmail.com>
Date: Mon, 16 Oct 2017 15:38:54 -0700
Subject: [PATCH] Update tox_install.sh for zuulv3

This patch will allow tox_install.sh to find the zuulv3 checked out version
of horizon.

Change-Id: Ief05fea76d06c4e93eff96de7f7e7a3b3ae3934b
---
 tools/tox_install.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/tox_install.sh b/tools/tox_install.sh
index 6cb6e159..9c10d94a 100755
--- a/tools/tox_install.sh
+++ b/tools/tox_install.sh
@@ -20,6 +20,7 @@ install_project() {
     local project=$1
     local branch=${2:-$BRANCH_NAME}
     local PROJECT_DIR=$HOME/$project
+    local ZUULV3_PROJECT_DIR=$HOME/src/git.openstack.org/openstack/$project
 
     set +e
     project_installed=$(echo "import $project" | python 2>/dev/null ; echo $?)
@@ -32,7 +33,10 @@ install_project() {
     # Note that the functional tests use sudo to run tox and thus
     # variables used for zuul-cloner to check out the correct version are
     # lost.
-    if [ -d "$PROJECT_DIR" ]; then
+    if [ -d "$ZUULV3_PROJECT_DIR" ]; then
+        echo "FOUND $project code at $ZUULV3_PROJECT_DIR - using"
+        $install_cmd -U $ZUULV3_PROJECT_DIR
+    elif [ -d "$PROJECT_DIR" ]; then
         echo "FOUND $project code at $PROJECT_DIR - using"
         $install_cmd -U $PROJECT_DIR
     elif [ $project_installed -eq 0 ]; then