From c38d9bd2d2d33ce9f40bcf87b359d0e234ff38bf Mon Sep 17 00:00:00 2001 From: zhurong Date: Mon, 10 Sep 2018 11:01:09 +0800 Subject: [PATCH] Use standard cover tox env Change-Id: I4aff1415ef0bbe83ea043388e13e2384b372c7d7 --- .testr.conf | 7 ------- coverage.sh | 8 -------- tox.ini | 9 ++++++++- 3 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 .testr.conf delete mode 100755 coverage.sh diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6d83b3c4e..000000000 --- a/.testr.conf +++ /dev/null @@ -1,7 +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} \ - ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/coverage.sh b/coverage.sh deleted file mode 100755 index 8801f3fd4..000000000 --- a/coverage.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -args= -if [ -n "$@" ] ; then - args="-t $@" -fi -python setup.py testr --coverage --slowest "$args" -python -m coverage report --show-missing -echo "Coverage generated, see cover/index.html" diff --git a/tox.ini b/tox.ini index 792b70f30..fb43a3701 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,14 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = ./coverage.sh {posargs} +setenv = + {[testenv]setenv} + PYTHON=coverage run --source solum --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:debug] basepython = python3