diff --git a/.gitignore b/.gitignore index 26e7d0d0bb..5bb4954b22 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ .manila-venv .coverage .stestr/* -.testrepository .tox .venv .idea diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 78b3824909..0000000000 --- a/.testr.conf +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./manila/tests $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index fc135c89d6..ff15aa1d64 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -24,7 +24,6 @@ requests-mock>=1.1.0 # Apache-2.0 sphinx>=1.6.2 # BSD os-api-ref>=1.4.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tools/cover.sh b/tools/cover.sh index 389884cf75..2279811643 100755 --- a/tools/cover.sh +++ b/tools/cover.sh @@ -29,7 +29,7 @@ uncommitted=$(git status --porcelain | grep -v "^??") git checkout HEAD^ baseline_report=$(mktemp -t manila_coverageXXXXXXX) -find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$TESTR_ARGS" +find . -type f -name "*.py[c|o]" -delete && stestr run "$TESTR_ARGS" && coverage combine && coverage html -d cover coverage report --ignore-errors > $baseline_report baseline_missing=$(awk 'END { print $3 }' $baseline_report) @@ -39,7 +39,7 @@ git checkout - # Generate and save coverage report current_report=$(mktemp -t manila_coverageXXXXXXX) -find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$TESTR_ARGS" +find . -type f -name "*.py[c|o]" -delete && stestr run "$TESTR_ARGS" && coverage combine && coverage html -d cover coverage report --ignore-errors > $current_report current_missing=$(awk 'END { print $3 }' $current_report) diff --git a/tox.ini b/tox.ini index bdf67a93d4..904aef10eb 100644 --- a/tox.ini +++ b/tox.ini @@ -72,7 +72,11 @@ commands = doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e txt -e rst [testenv:cover] -commands = {toxinidir}/tools/cover.sh {posargs} +setenv = + {[testenv]setenv} + PYTHON=coverage run --source manila --parallel-mode +commands = + {toxinidir}/tools/cover.sh {posargs} [testenv:fast8] commands =