I'm not exposing this via the Makefile help, it's not likely to be
useful to passersby. Switch the avocado runner to the 'legacy' runner
for now, as the new runner seems to obscure coverage reports, again.
Usage is to enter your venv of choice and then:
`make check-coverage && xdg-open htmlcov/index.html`.
Signed-off-by: John Snow <[email protected]>
Message-id:
20210915162955[email protected]
Signed-off-by: John Snow <[email protected]>
.venv/
.tox/
.dev-venv/
+
+# Coverage.py reports
+.coverage
+.coverage.*
+htmlcov/
check-tox:
@tox $(QEMU_TOX_EXTRA_ARGS)
+.PHONY: check-coverage
+check-coverage:
+ @coverage run -m avocado --config avocado.cfg run tests/*.py
+ @coverage combine
+ @coverage html
+ @coverage report
+
.PHONY: clean
clean:
python3 setup.py clean --all
.PHONY: distclean
distclean: clean
rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
+ rm -f .coverage .coverage.*
+ rm -rf htmlcov/
+[run]
+test_runner = runner
+
[simpletests]
# Don't show stdout/stderr in the test *summary*
status.failure_fields = ['status']
.[fuse] # Workaround to trigger tox venv rebuild
commands =
make check
+
+# Coverage.py [https://coverage.readthedocs.io/en/latest/] is a tool for
+# measuring code coverage of Python programs. It monitors your program,
+# noting which parts of the code have been executed, then analyzes the
+# source to identify code that could have been executed but was not.
+
+[coverage:run]
+concurrency = multiprocessing
+source = qemu/
+parallel = true