Adds coverage to test suite

pull/242/head
Josh Asplund 7 years ago
parent f5a46ef7bc
commit 1790f64336
  1. 4
      .circleci/config.yml
  2. 15
      tox.ini

@ -17,7 +17,7 @@ jobs:
- restore-cache:
keys:
- tox-env-{{ checksum "/home/mythril/tox.ini" }}-{{ checksum "/home/mythril/setup.py" }}
- tox-env-{{ checksum "/home/mythril/setup.py" }}
- run:
name: Installing mythril tools
@ -33,7 +33,7 @@ jobs:
LANG: C.UTF-8
- save_cache:
key: tox-env-{{ checksum "/home/mythril/tox.ini" }}-{{ checksum "/home/mythril/setup.py" }}
key: tox-env-{{ checksum "/home/mythril/setup.py" }}
paths:
- .tox/py*
- /root/.cache/pip/wheels/

@ -9,13 +9,13 @@ whitelist_externals = mkdir
commands =
mkdir -p {toxinidir}/tests/testdata/outputs_current/
py.test -v \
--junitxml={toxworkdir}/output/junit-{envname}.xml \
--junitprefix={envname} \
--junitxml={toxworkdir}/output/{envname}/junit.xml \
{posargs}
[testenv:coverage]
[testenv:py36]
basepython = python3.6
setenv =
COVERAGE_FILE = .coveragerc
COVERAGE_FILE = .coverage.{envname}
deps =
pytest
pytest-mock
@ -25,8 +25,7 @@ commands =
mkdir -p {toxinidir}/tests/testdata/outputs_current/
py.test -v \
--cov=mythril \
--cov-report=xml:{toxworkdir}/output/cov-{envname}.xml \
--cov-report=html:{toxworkdir}/output/cov-{envname}.html \
--junitxml={toxworkdir}/output/junit-{envname}.xml \
--junitprefix={envname} \
--cov-report=xml:{toxworkdir}/output/{envname}/coverage.xml \
--cov-report=html:{toxworkdir}/output/{envname}/covhtml \
--junitxml={toxworkdir}/output/{envname}/junit.xml \
{posargs}

Loading…
Cancel
Save