]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Changes to make pip-based tests work with jenkins.
authorMonty Taylor <mordred@inaugust.com>
Wed, 16 Nov 2011 03:30:40 +0000 (01:30 -0200)
committerMonty Taylor <mordred@inaugust.com>
Wed, 16 Nov 2011 03:32:03 +0000 (01:32 -0200)
The git line for the cisco pip-requires was wrong.
The venv needs to be installed in the source tree, not in the home
directory for self-contained builds.
The version of python can't be assumed and must be calculated.

Change-Id: I23d381eb273e82796e309483086dc68f27ce6093

plugins/cisco-plugin/pip-requires
tools/install_venv.py
tools/with_venv.sh

index 3d710597b93b18b443b757661ac1e20521be0884..dcd1ed51e12f0ac09df1fc159da67675e15d9bcd 100644 (file)
@@ -1 +1 @@
-http://github.com/CiscoSystems/ncclient.git 
+-e git+https://github.com/CiscoSystems/ncclient.git#egg=ncclient
index 16db235873e1ba05dfad6bb27c0a38e8f6da3bda..8bb57849aec72b3e46cbd0fef2b2f90550234a11 100644 (file)
@@ -29,9 +29,12 @@ import sys
 
 
 ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
-VENV = os.path.expanduser('~/.quantum-venv')
+VENV = os.path.join(ROOT, '.quantum-venv')
+PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
+
 VENV_EXISTS = bool(os.path.exists(VENV))
 
+
 # Find all pip-requires in the project
 PIP_REQUIRES = []
 for root, dirs, files in os.walk(os.path.join(ROOT)):
@@ -107,7 +110,7 @@ def install_dependencies(venv=VENV):
     run_command(cmd, redirect_output=False)
 
     # Tell the virtual env how to "import quantum"
-    pthfile = os.path.join(venv, "lib", "python2.6", "site-packages",
+    pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
                                  "quantum.pth")
     f = open(pthfile, 'w')
     f.write("%s\n" % ROOT)
index 88444a24030c2fadefbaae25d1290268a1253b7a..83149462c1aa06520a7ea6ea4e49c48bee2a231b 100755 (executable)
@@ -17,5 +17,5 @@
 #    under the License.
 
 TOOLS=`dirname $0`
-VENV=~/.quantum-venv
+VENV=$TOOLS/../.quantum-venv
 source $VENV/bin/activate && $@