]> gitweb.michael.orlitzky.com - dunshire.git/blob - makefile
test: add the ability to run the test suite verbosely.
[dunshire.git] / makefile
1 PN := dunshire
2 SRCS := $(PN)/*.py test/*.py
3
4 # Sphinx tries to keep track of which docs need to be built on its
5 # own. We could do better, but we would have to duplicate all of the
6 # information that we already gave Sphinx to make it work. Thus the
7 # "doc" target will unconditionally invoke sphinx.
8 .PHONY: doc
9 doc:
10 cd doc && $(MAKE) html
11
12 # Run the doctests contained in the sphinx documentation, which aren't
13 # run as part of the normal test suite (because nobody wants to wait
14 # for sphinx to run).
15 .PHONY: doctest
16 doctest:
17 cd doc && $(MAKE) doctest
18
19 # Run the test suite once.
20 .PHONY: check
21 check:
22 PYTHONPATH="." test/__main__.py
23
24 # Run the test suite once, loudly. This is used in Gentoo, for example
25 # where we want users to see the output from the test suite on the off
26 # chance that it fails and they have to report it.
27 .PHONY: check-verbose
28 check-verbose:
29 PYTHONPATH="." test/__main__.py --verbose
30
31 # Run the test suite forever, but only the parts of it that are
32 # randomized.
33 .PHONY: checkloop
34 checkloop:
35 PYTHONPATH="." test/__main__.py --no-doctests --loop
36
37 # Run pylint to obtain some unconstructive criticism on my coding style.
38 .PHONY: lint
39 lint:
40 pylint --rcfile=./.pylintrc $(SRCS)
41
42 # Create a source distribution tarball. First we clean up, to make
43 # sure no junk gets added to the distribution. Then we build the docs
44 # so that users will get some usable HTML documentation and not just
45 # the source files.
46 .PHONY: dist
47 dist: clean doc
48 python setup.py sdist
49
50 # Delete urrythang.
51 .PHONY: clean
52 clean:
53 rm -rf $(PN)/__pycache__ test/__pycache__ doc/build
54 rm -rf $(PN).egg-info
55 rm -rf dist