]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix ./run_tests.sh -V --virtual-env-name
authorEric Harney <eharney@redhat.com>
Fri, 22 Nov 2013 15:13:58 +0000 (10:13 -0500)
committerEric Harney <eharney@redhat.com>
Fri, 22 Nov 2013 15:14:22 +0000 (10:14 -0500)
Currently if --virtual-env-name is specified, the tests fail
because it still creates .venv/ but then looks in the specified
location to use the venv.

This makes --virtual-env-name work as expected.

Change-Id: I036cd08f7b7b9dc87e7012f8dd198a26375297a2

tools/install_venv.py

index 772cac96de178e99daebd2add87fd7275c8f0372..9d76055cbc574dd91712f477a8fb09fa9ce0390d 100644 (file)
@@ -56,6 +56,8 @@ def print_help():
 def main(argv):
     root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
     venv = os.path.join(root, '.venv')
+    if os.environ.get('venv'):
+        venv = os.environ['venv']
     pip_requires = os.path.join(root, 'requirements.txt')
     test_requires = os.path.join(root, 'test-requirements.txt')
     project = 'Cinder'