Updates tox.ini's cover environment
The openstack-tox-cover job expects a coverage report at the end. This patch updates the cover environment in tox.ini, bringing it in line with the other repos. This also adds stestr in test-requirements, which is needed by the new coverage env. Finally, removes the cloudbaseinit import from releasenotes. According to [1], a project shouldn't necessarely be installed in order to build its releasenotes. [1] http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html Change-Id: I77dfe57f1190fc62f7bd19284e2c86d55bb1804a
This commit is contained in:
		
							
								
								
									
										2
									
								
								.coveragerc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.coveragerc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
[run]
 | 
			
		||||
omit = */cloudbaseinit/tests/resources/*
 | 
			
		||||
							
								
								
									
										3
									
								
								.stestr.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.stestr.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
[DEFAULT]
 | 
			
		||||
test_path=${OS_TEST_PATH:-./cloudbaseinit/tests}
 | 
			
		||||
top_dir=./
 | 
			
		||||
@@ -67,11 +67,10 @@ bug_tag = ''
 | 
			
		||||
# |version| and |release|, also used in various other places throughout the
 | 
			
		||||
# built documents.
 | 
			
		||||
#
 | 
			
		||||
from cloubaseinit import version
 | 
			
		||||
# Release notes are version independent, no need to set version and release.
 | 
			
		||||
version = ""
 | 
			
		||||
# The full version, including alpha/beta/rc tags.
 | 
			
		||||
release = version.get_version()
 | 
			
		||||
# The short X.Y version.
 | 
			
		||||
version = version.get_canonical_version()
 | 
			
		||||
release = ""
 | 
			
		||||
 | 
			
		||||
# The language for content autogenerated by Sphinx. Refer to documentation
 | 
			
		||||
# for a list of supported languages.
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@ sphinx
 | 
			
		||||
oslosphinx
 | 
			
		||||
testtools>=0.9.32
 | 
			
		||||
testrepository>=0.0.18
 | 
			
		||||
stestr>=2.0.0
 | 
			
		||||
openstackdocstheme>=1.11.0  # Apache-2.0
 | 
			
		||||
# releasenotes
 | 
			
		||||
reno>=1.8.0 # Apache-2.0
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								tox.ini
									
									
									
									
									
								
							@@ -22,7 +22,16 @@ commands = flake8 {posargs}
 | 
			
		||||
commands = bash tools/lintstack.sh
 | 
			
		||||
 | 
			
		||||
[testenv:cover]
 | 
			
		||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
 | 
			
		||||
basepython = python2.7
 | 
			
		||||
setenv =
 | 
			
		||||
  {[testenv]setenv}
 | 
			
		||||
  PYTHON=coverage run --source cloudbaseinit --parallel-mode
 | 
			
		||||
commands =
 | 
			
		||||
  stestr run --no-subunit-trace {posargs}
 | 
			
		||||
  coverage combine
 | 
			
		||||
  coverage report --fail-under=82 --skip-covered
 | 
			
		||||
  coverage html -d cover
 | 
			
		||||
  coverage xml -o cover/coverage.xml
 | 
			
		||||
 | 
			
		||||
[testenv:venv]
 | 
			
		||||
commands = {posargs}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user