diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .stestr.conf | 3 | ||||
-rw-r--r-- | .testr.conf | 4 | ||||
-rw-r--r-- | doc/source/contributor/dev-quickstart.rst | 9 | ||||
-rw-r--r-- | tox.ini | 9 |
5 files changed, 9 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore index 37af5bdbd..c885b687d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ develop-eggs *.DS_Store .idea .testrepository +.stestr .tox .venv .*.swp diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..b9113287b --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${TESTS_DIR:-./ironic/tests/unit/} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 4e0e03c3c..000000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/unit/} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/doc/source/contributor/dev-quickstart.rst b/doc/source/contributor/dev-quickstart.rst index 692847283..04e4dd12f 100644 --- a/doc/source/contributor/dev-quickstart.rst +++ b/doc/source/contributor/dev-quickstart.rst @@ -103,15 +103,6 @@ name. For example:: # run the unit tests under py27 and also run the pep8 tests tox -epy27 -epep8 -.. note:: - If tests are run under py27 and then run under py35 the following error may occur:: - - db type could not be determined - ERROR: InvocationError: '/home/ubuntu/ironic/.tox/py35/bin/ostestr' - - To overcome this error remove the file `.testrepository/times.dbm` - and then run the py35 test. - You may pass options to the test programs using positional arguments. To run a specific unit test, this passes the -r option and desired test (regex string) to `os-testr <https://pypi.python.org/pypi/os-testr>`_:: @@ -13,9 +13,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning TESTS_DIR=./ironic/tests/unit/ deps = -r{toxinidir}/test-requirements.txt -whitelist_externals = rm commands = - rm -f .testrepository/times.dbm ostestr {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY @@ -44,10 +42,13 @@ commands = [testenv:cover] setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US + PYTHON=coverage run --source ironic --omit='*tests*' --parallel-mode commands = coverage erase - python setup.py testr --coverage --omit='*test*' --testr-args='{posargs}' - coverage report --omit='*test*' + ostestr {posargs} + coverage combine + coverage report --omit='*tests*' + coverage html -d ./cover --omit='*tests*' [testenv:checkconfig] sitepackages = False |