[gtk-doc] tests: add coverage test target



commit 6f3cce64895c9def246ce9f1ae55ea6271a4e7eb
Author: Stefan Sauer <ensonic users sf net>
Date:   Wed Dec 12 21:28:58 2018 +0100

    tests: add coverage test target

 HACKING           | 6 +++++-
 tests/Makefile.am | 8 ++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/HACKING b/HACKING
index fe4c506..f4b007b 100644
--- a/HACKING
+++ b/HACKING
@@ -115,4 +115,8 @@ Test Coverage
 =============
 sudo apt-get install python3-coverage
 PYTHONPATH=$PWD python3-coverage run tests/scan.py
-python3-coverage html
+python3-coverage html --include="gtkdoc/*.py"
+
+or
+
+cd test; make coverage
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0e2ec80..9ddfb47 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -44,6 +44,14 @@ snapshot:
     fi; \
        done
 
+coverage:
+       @python3-coverage erase; \
+       for f in *.py; do \
+         $(TESTS_ENVIRONMENT) python3-coverage run -a $$f; \
+       done; \
+       python3-coverage html --include="*/gtkdoc/*.py"
+
+
 .PHONY: snapshot
 
 -include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]