author | Augie Fackler <raf@durin42.com> |
Mon, 14 Mar 2016 20:11:47 -0400 | |
changeset 1879 | bd5c2922a8ad |
parent 1839 | 1bc5e62fc0c7 |
child 1883 | ebf146c77709 |
permissions | -rw-r--r-- |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 |
PYTHON=python |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
2 |
ifeq ($(HGROOT),) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
3 |
$(error HGROOT is not set to the root of the hg source tree) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
4 |
endif |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
5 |
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
6 |
|
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
7 |
HGTESTS=$(HGROOT)/tests |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 |
help: |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 |
@echo 'Commonly used make targets:' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 |
@echo ' tests - run all tests in the automatic test suite' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 |
@echo ' all-version-tests - run all tests against many hg versions' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 |
@echo ' tests-%s - run all tests in the specified hg version' |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 |
all: help |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 |
tests: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
18 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 |
test-%: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
21 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 |
tests-%: |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
24 |
hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \ |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
25 |
(cd $(HGROOT) ; $(MAKE) clean ) && \ |
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
26 |
cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 |
all-version-tests: tests-tip |
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 |
|
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
30 |
.PHONY: tests all-version-tests |