From 010cadf1141b4ea5677175455b7ab2975e1e51a2 Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Wed, 16 Nov 2016 14:01:41 -0500 Subject: [PATCH] Consolidate tox run output into one report The original implementation of erasing the coverage data file between each test was the most accurate method, providing coverage stats in a 'cleanroom' setup, but resulted in extra reports being output. This doesn't scale very well as more test files are added to the repository. This patchset removes the extranenous erase command, and adds the `-a` argument to the run commands, which allows coverage to accumulate data across runs. Without the `-a` run, the coverage reports for each target file are cross-contaminated, resulting in different coverage numbers. Depends-On: I06729ac2bc1688a39255f2c8ea0d14131b5c2560 Change-Id: I4d52f7363e00bba62ed878fe8fa6e593eb21fdde --- tox.ini | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index e8f1b76782..b8d261b51c 100644 --- a/tox.ini +++ b/tox.ini @@ -147,13 +147,10 @@ setenv = PYTHONHASHSEED = 100 commands = coverage erase - coverage run {toxinidir}/tests/test_inventory.py + coverage run -a {toxinidir}/tests/test_inventory.py + coverage run -a {toxinidir}/tests/test_manage.py + coverage run -a {toxinidir}/tests/test_ip.py coverage report --show-missing --include={toxinidir}/playbooks/inventory/*,{toxinidir}/lib/* - coverage erase - coverage run {toxinidir}/tests/test_manage.py - coverage report --show-missing --include={toxinidir}/lib/* - coverage run {toxinidir}/tests/test_ip.py - coverage report --show-missing --include={toxinidir}/lib/* [testenv:linters]