summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-07 18:22:54 +0000
committerGerrit Code Review <review@openstack.org>2013-03-07 18:22:54 +0000
commit436282fad2b5ab4dfc69b49442aaedd8d123f1e8 (patch)
tree40180312f51d412781c45a9a6f3c9cbf1e2d79b0
parentf0ed72072ba15f9b2730fbd77a1614285bed81ab (diff)
parent0b2e8d6e0638dc1764965581f25266144b5abb9d (diff)
downloadnova-436282fad2b5ab4dfc69b49442aaedd8d123f1e8.tar.gz
nova-436282fad2b5ab4dfc69b49442aaedd8d123f1e8.tar.xz
nova-436282fad2b5ab4dfc69b49442aaedd8d123f1e8.zip
Merge "Update tox.ini to support RHEL 6.x."
-rw-r--r--tools/install_venv_common.py3
-rw-r--r--tools/patch_tox_venv.py38
-rw-r--r--tox.ini6
3 files changed, 45 insertions, 2 deletions
diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py
index 7ecf5010f..413065640 100644
--- a/tools/install_venv_common.py
+++ b/tools/install_venv_common.py
@@ -185,7 +185,8 @@ class Fedora(Distro):
self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
def apply_patch(self, originalfile, patchfile):
- self.run_command(['patch', originalfile, patchfile])
+ self.run_command(['patch', '-N', originalfile, patchfile],
+ check_exit_code=False)
def install_virtualenv(self):
if self.check_cmd('virtualenv'):
diff --git a/tools/patch_tox_venv.py b/tools/patch_tox_venv.py
new file mode 100644
index 000000000..399acbcfc
--- /dev/null
+++ b/tools/patch_tox_venv.py
@@ -0,0 +1,38 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import os
+import sys
+
+import install_venv_common as install_venv
+
+
+def main(argv):
+ root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+
+ venv = os.environ['VIRTUAL_ENV']
+
+ pip_requires = os.path.join(root, 'tools', 'pip-requires')
+ test_requires = os.path.join(root, 'tools', 'test-requires')
+ py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
+ project = 'Nova'
+ install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
+ py_version, project)
+ #NOTE(dprince): For Tox we only run post_process (which patches files, etc)
+ install.post_process()
+
+if __name__ == '__main__':
+ main(sys.argv)
diff --git a/tox.ini b/tox.ini
index b4b5ccc20..4849eff4e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,7 +8,9 @@ setenv = VIRTUAL_ENV={envdir}
LC_ALL=C
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
-commands = python setup.py testr --slowest --testr-args='{posargs}'
+commands =
+ python tools/patch_tox_venv.py
+ python setup.py testr --slowest --testr-args='{posargs}'
[tox:jenkins]
sitepackages = True
@@ -30,7 +32,9 @@ commands = python tools/flakes.py nova
[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
+setenv = VIRTUAL_ENV={envdir}
commands =
+ python tools/patch_tox_venv.py
python setup.py testr --coverage \
--testr-args='^(?!.*test.*coverage).*$'