Fix up test running to match jenkins expectation.
Change-Id: I215cd92d707f81ed481897704b31188017a5a8b8
This commit is contained in:
6
.coveragerc
Normal file
6
.coveragerc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,quantum/tests/*
|
||||||
|
|
||||||
|
[report]
|
||||||
|
ignore-errors = True
|
||||||
10
setup.cfg
10
setup.cfg
@@ -5,9 +5,7 @@
|
|||||||
# openstack-nose https://github.com/jkoelker/openstack-nose
|
# openstack-nose https://github.com/jkoelker/openstack-nose
|
||||||
verbosity=2
|
verbosity=2
|
||||||
detailed-errors=1
|
detailed-errors=1
|
||||||
with-openstack=1
|
cover-package = quantum
|
||||||
openstack-red=0.05
|
cover-html = true
|
||||||
openstack-yellow=0.025
|
cover-erase = true
|
||||||
openstack-show-elapsed=1
|
where=quantum/tests/unit
|
||||||
openstack-color=1
|
|
||||||
|
|
||||||
|
|||||||
25
setup.py
25
setup.py
@@ -12,25 +12,17 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
import setuptools
|
||||||
|
|
||||||
from quantum.openstack.common.setup import generate_authors
|
from quantum.openstack.common import setup
|
||||||
from quantum.openstack.common.setup import parse_requirements
|
|
||||||
from quantum.openstack.common.setup import parse_dependency_links
|
|
||||||
from quantum.openstack.common.setup import write_requirements
|
|
||||||
from quantum.openstack.common.setup import write_git_changelog
|
|
||||||
from quantum.openstack.common.setup import write_vcsversion
|
|
||||||
|
|
||||||
|
setup.write_vcsversion('quantum/vcsversion.py')
|
||||||
requires = parse_requirements()
|
|
||||||
depend_links = parse_dependency_links()
|
|
||||||
write_requirements()
|
|
||||||
write_git_changelog()
|
|
||||||
write_vcsversion('quantum/vcsversion.py')
|
|
||||||
generate_authors()
|
|
||||||
|
|
||||||
from quantum import version
|
from quantum import version
|
||||||
|
|
||||||
|
requires = setup.parse_requirements()
|
||||||
|
depend_links = setup.parse_dependency_links()
|
||||||
|
|
||||||
Name = 'quantum'
|
Name = 'quantum'
|
||||||
Url = "https://launchpad.net/quantum"
|
Url = "https://launchpad.net/quantum"
|
||||||
Version = version.canonical_version_string()
|
Version = version.canonical_version_string()
|
||||||
@@ -77,7 +69,7 @@ DataFiles = [
|
|||||||
(ryu_plugin_config_path, ['etc/quantum/plugins/ryu/ryu.ini']),
|
(ryu_plugin_config_path, ['etc/quantum/plugins/ryu/ryu.ini']),
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(
|
setuptools.setup(
|
||||||
name=Name,
|
name=Name,
|
||||||
version=Version,
|
version=Version,
|
||||||
url=Url,
|
url=Url,
|
||||||
@@ -90,7 +82,8 @@ setup(
|
|||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
dependency_links=depend_links,
|
dependency_links=depend_links,
|
||||||
include_package_data=False,
|
include_package_data=False,
|
||||||
packages=find_packages('.'),
|
packages=setuptools.find_packages('.'),
|
||||||
|
cmdclass=setup.get_cmdclass(),
|
||||||
data_files=DataFiles,
|
data_files=DataFiles,
|
||||||
eager_resources=EagerResources,
|
eager_resources=EagerResources,
|
||||||
entry_points={
|
entry_points={
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
|||||||
|
|
||||||
VENV_EXISTS = bool(os.path.exists(VENV))
|
VENV_EXISTS = bool(os.path.exists(VENV))
|
||||||
|
|
||||||
|
|
||||||
def die(message, *args):
|
def die(message, *args):
|
||||||
print >> sys.stderr, message % args
|
print >> sys.stderr, message % args
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -67,7 +68,7 @@ def check_dependencies():
|
|||||||
"""Make sure virtualenv is in the path."""
|
"""Make sure virtualenv is in the path."""
|
||||||
|
|
||||||
if not HAS_VIRTUALENV:
|
if not HAS_VIRTUALENV:
|
||||||
raise Exception('Virtualenv not found. ' + \
|
raise Exception('Virtualenv not found. ' +
|
||||||
'Try installing python-virtualenv')
|
'Try installing python-virtualenv')
|
||||||
print 'done.'
|
print 'done.'
|
||||||
|
|
||||||
|
|||||||
43
tox.ini
43
tox.ini
@@ -3,39 +3,26 @@ envlist = py26,py27,pep8
|
|||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
NOSE_WITH_OPENSTACK=1
|
||||||
|
NOSE_OPENSTACK_COLOR=1
|
||||||
|
NOSE_OPENSTACK_RED=0.05
|
||||||
|
NOSE_OPENSTACK_YELLOW=0.025
|
||||||
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
||||||
|
NOSE_OPENSTACK_STDOUT=1
|
||||||
deps = -r{toxinidir}/tools/pip-requires
|
deps = -r{toxinidir}/tools/pip-requires
|
||||||
-r{toxinidir}/tools/test-requires
|
-r{toxinidir}/tools/test-requires
|
||||||
commands = nosetests --where=quantum/tests/unit {posargs}
|
commands = nosetests {posargs}
|
||||||
|
|
||||||
|
[tox:jenkins]
|
||||||
|
sitepackages = True
|
||||||
|
downloadcache = ~/cache/pip
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = pep8
|
deps = pep8
|
||||||
commands = pep8 --repeat --show-source quantum setup.py
|
commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc .
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
setenv = NOSE_WITH_COVERAGE=1
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
|
||||||
commands = nosetests --with-coverage --cover-html --cover-erase --cover-package=quantum {posargs}
|
|
||||||
|
|
||||||
[testenv:hudson]
|
|
||||||
downloadcache = ~/cache/pip
|
|
||||||
|
|
||||||
[testenv:jenkins26]
|
|
||||||
basepython = python2.6
|
|
||||||
deps = file://{toxinidir}/.cache.bundle
|
|
||||||
|
|
||||||
[testenv:jenkins27]
|
|
||||||
basepython = python2.7
|
|
||||||
deps = file://{toxinidir}/.cache.bundle
|
|
||||||
|
|
||||||
[testenv:jenkinspep8]
|
|
||||||
deps = file://{toxinidir}/.cache.bundle
|
|
||||||
commands = pep8 --repeat --show-source quantum setup.py
|
|
||||||
|
|
||||||
[testenv:jenkinscover]
|
|
||||||
deps = file://{toxinidir}/.cache.bundle
|
|
||||||
commands = nosetests --where=quantum/tests/unit --cover-erase --cover-package=quantum --with-xcoverage {posargs}
|
|
||||||
|
|
||||||
[testenv:jenkinsvenv]
|
|
||||||
deps = file://{toxinidir}/.cache.bundle
|
|
||||||
commands = {posargs}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user