From 6148f9fb3bdd9d93bdc206555f1371c9eb14a0f3 Mon Sep 17 00:00:00 2001 From: ankit Date: Thu, 9 May 2019 11:09:37 +0000 Subject: [PATCH] Adding changes for tox failure This patch resolves the issue of tox failure. Change-Id: I565cd2593982a1b5c8c43cf394301c56e24b9b29 Closes-Bug: 1828511 --- .stestr.conf | 3 +++ .testr.conf | 4 ---- tox.ini | 15 ++++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..ad6d5f7a --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${TESTS_DIR:-./proliantutils/tests/} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 48977727..00000000 --- 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:-./proliantutils/tests/} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/tox.ini b/tox.ini index 974d5ce8..ae8d0c16 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir} LC_ALL=en_US.UTF-8 TESTS_DIR=./proliantutils/tests/ deps = -r{toxinidir}/test-requirements.txt -commands = ostestr {posargs} +commands = stestr run {posargs} [testenv:pep8] basepython = python2.7 @@ -25,10 +25,15 @@ commands = # in your browser, to see a nicer presentation report with annotated # HTML listings detailing missed lines. basepython = python2.7 -deps = {[testenv]deps} -commands = coverage erase - python setup.py testr --coverage --omit='*test*' --testr-args='{posargs}' - coverage report --omit=*test* +setenv = VIRTUAL_ENV={envdir} + LANGUAGE=en_US + PYTHON=coverage run --source proliantutils --omit='*tests*' --parallel-mode +commands = + coverage erase + stestr run {posargs} + coverage combine + coverage report --omit='*tests*' + coverage html -d ./cover --omit='*tests*' [flake8] # Exclude MIB directories from flake8/pep8 tests as these are