annotate Makefile @ 1041:c96bf9e61598

tests: run doctests when testing against particular hg versions
author Kevin Bullock <kbullock@ringworld.org>
date Mon, 07 Aug 2017 15:40:42 -0400
parents fddb62eaf217
children c560ed4d5a55
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 PYTHON=python
971
e259824cf863 Makefile: respect HGTESTFLAGS environment variable
Augie Fackler <raf@durin42.com>
parents: 944
diff changeset
2 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
34
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
4 help:
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 @echo 'Commonly used make targets:'
354
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
6 @echo ' tests - run all tests in the automatic test suite'
448
e58a6d0b80e2 Remove illegal characters from username/email
Keshav Kini <keshav.kini@gmail.com>
parents: 431
diff changeset
7 @echo ' all-version-tests - run all tests against many hg versions'
354
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
8 @echo ' tests-%s - run all tests in the specified hg version'
34
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
9
354
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
10 all: help
34
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12 tests:
1040
fddb62eaf217 tests: use $PYTHON to run doctests
Kevin Bullock <kbullock@ringworld.org>
parents: 1039
diff changeset
13 $(PYTHON) -m doctest hggit/*.py contrib/*.py
34
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
14 cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS)
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
15
50a0d52ef979 Makefile to ease running of tests.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
16 test-%:
48
b9c6871c939e Fix single test running.
Augie Fackler <durin42@gmail.com>
parents: 34
diff changeset
17 cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS) $@
354
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
18
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
19 tests-%:
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
20 @echo "Path to crew repo is $(CREW) - set this with CREW= if needed."
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
21 hg -R $(CREW) checkout $$(echo $@ | sed s/tests-//) && \
1041
c96bf9e61598 tests: run doctests when testing against particular hg versions
Kevin Bullock <kbullock@ringworld.org>
parents: 1040
diff changeset
22 (cd $(CREW) ; $(MAKE) clean local) && \
c96bf9e61598 tests: run doctests when testing against particular hg versions
Kevin Bullock <kbullock@ringworld.org>
parents: 1040
diff changeset
23 PYTHONPATH=$(CREW) $(PYTHON) -m doctest hggit/*.py contrib/*.py && \
354
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
24 cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS)
428c819f3135 Makefile: add target for testing against many hg versions at once
Augie Fackler <durin42@gmail.com>
parents: 48
diff changeset
25
480
c88e8a88c5f6 makefile: document all-version-tests intentions
David M. Carr <david@carrclan.us>
parents: 472
diff changeset
26 # This is intended to be the authoritative list of Hg versions that this
c88e8a88c5f6 makefile: document all-version-tests intentions
David M. Carr <david@carrclan.us>
parents: 472
diff changeset
27 # extension is tested with. Versions prior to the version that ships in the
719
3a045277a434 Makefile: drop support for hg older than 2.8.2
Augie Fackler <raf@durin42.com>
parents: 674
diff changeset
28 # latest Ubuntu LTS release (2.8.2 for 14.04 LTS) may be dropped if they
480
c88e8a88c5f6 makefile: document all-version-tests intentions
David M. Carr <david@carrclan.us>
parents: 472
diff changeset
29 # interfere with new development. The latest released minor version should be
c88e8a88c5f6 makefile: document all-version-tests intentions
David M. Carr <david@carrclan.us>
parents: 472
diff changeset
30 # listed for each major version; earlier minor versions are not needed.
914
e4006703a287 tests: use Mercurial 3.4.1 for all-version-tests
Siddharth Agarwal <sid0@fb.com>
parents: 901
diff changeset
31 # Mercurial 3.4 had a core bug that caused a harmless test failure -- 3.4.1
e4006703a287 tests: use Mercurial 3.4.1 for all-version-tests
Siddharth Agarwal <sid0@fb.com>
parents: 901
diff changeset
32 # fixes that bug.
e4006703a287 tests: use Mercurial 3.4.1 for all-version-tests
Siddharth Agarwal <sid0@fb.com>
parents: 901
diff changeset
33
993
1fec6463922b tests: update list of hg versions we've tested with
Kevin Bullock <kbullock@ringworld.org>
parents: 985
diff changeset
34 all-version-tests: tests-2.8.2 tests-2.9.2 tests-3.0.2 tests-3.1.2 tests-3.2.4 \
1fec6463922b tests: update list of hg versions we've tested with
Kevin Bullock <kbullock@ringworld.org>
parents: 985
diff changeset
35 tests-3.3.3 tests-3.4.2 tests-3.5.2 tests-3.6.3 tests-3.7.3 tests-3.8.4 \
1030
2d6b240319ef compat: update hg versions we test against
Kevin Bullock <kbullock@ringworld.org>
parents: 1014
diff changeset
36 tests-3.9.2 tests-4.0.2 tests-4.1.3 tests-4.2.2 tests-4.3-rc tests-@
363
07f6613fe0df Makefile: add .PHONY so tests will run correctly
Augie Fackler <durin42@gmail.com>
parents: 357
diff changeset
37
07f6613fe0df Makefile: add .PHONY so tests will run correctly
Augie Fackler <durin42@gmail.com>
parents: 357
diff changeset
38 .PHONY: tests all-version-tests