From 9eb69b6c0f6e8a66aa28fe7b63a8d26a9fce809c Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Thu, 22 Aug 2013 13:37:13 +0100 Subject: [PATCH] Add coverage targets in quickstart generated Makefile and make.bat. --- sphinx/quickstart.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 73926f82e..7bba0c479 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -418,7 +418,7 @@ $(SPHINXOPTS) %(rsrcdir)s I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) %(rsrcdir)s .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \ -epub latex latexpdf text man changes linkcheck doctest gettext +epub latex latexpdf text man changes linkcheck doctest coverage gettext help: \t@echo "Please use \\`make ' where is one of" @@ -445,6 +445,7 @@ help: \t@echo " linkcheck to check all external links for integrity" \t@echo " doctest to run all doctests embedded in the documentation \ (if enabled)" +\t@echo " coverage to check coverage of the documentation if enabled" clean: \trm -rf $(BUILDDIR)/* @@ -567,6 +568,11 @@ doctest: \t@echo "Testing of doctests in the sources finished, look at the " \\ \t "results in $(BUILDDIR)/doctest/output.txt." +coverage: +\t$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage +\t@echo "Documentation coverage is finished, look at the " \\ +\t "results in $(BUILDDIR)/coverage/python.txt." + xml: \t$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml \t@echo @@ -618,6 +624,7 @@ if "%%1" == "help" ( \techo. pseudoxml to make pseudoxml-XML files for display purposes \techo. linkcheck to check all external links for integrity \techo. doctest to run all doctests embedded in the documentation if enabled +\techo. coverage to check coverage of the documentation if enabled \tgoto end ) @@ -804,6 +811,15 @@ results in %%BUILDDIR%%/doctest/output.txt. \tgoto end ) +if "%%1" == "coverage" ( +\t%%SPHINXBUILD%% -b coverage %%ALLSPHINXOPTS%% %%BUILDDIR%%/coverage +\tif errorlevel 1 exit /b 1 +\techo. +\techo.Documentation coverage is finished, look at the ^ +results in %%BUILDDIR%%/coverage/python.txt. +\tgoto end +) + if "%%1" == "xml" ( \t%%SPHINXBUILD%% -b xml %%ALLSPHINXOPTS%% %%BUILDDIR%%/xml \tif errorlevel 1 exit /b 1