diff --git a/.gitignore b/.gitignore index 2254f0e73d..1b5a3be5b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ /.tox/ -/releases.egg-info/ +/*.egg-info/ /.eggs/ /AUTHORS /ChangeLog /doc/build/ *~ *.pyc -/doc/source/teams/*.rst \ No newline at end of file +/doc/source/teams/*.rst +/.coverage* +/.testrepository/ +/cover/ diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000000..1641f86e35 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/setup.cfg b/setup.cfg index cd5ee037f0..03dd887aca 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = releases +name = openstack_releases summary = OpenStack Releases description-file = README.rst diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000..b71e0c4bdc --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,17 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. + +hacking<0.11,>=0.10.0 + +fixtures>=3.0.0 # Apache-2.0/BSD +python-subunit>=0.0.18 # Apache-2.0/BSD +testrepository>=0.0.18 # Apache-2.0/BSD +testscenarios>=0.4 # Apache-2.0/BSD +testtools>=1.4.0 # MIT +oslotest>=1.10.0 # Apache-2.0 + +coverage>=4.0 # Apache-2.0 + +# mocking framework +mock>=2.0 # BSD diff --git a/tox.ini b/tox.ini index c3cddb1eec..9cef2584a3 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,10 @@ setenv = # launchpadlib 0.0.1.dev533 requires lazr.restfulclient, which is # py2-only (as of lazr.restfulclient 0.13.1) basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt +commands = + python setup.py testr --coverage --testr-args='{posargs}' + coverage report --show-missing [testenv:validate] deps =