Mercurial > evolve
changeset 1879:bd5c2922a8ad
Makefile: rework running of tests
This makes running tests easier without depending on our own copy of
run-tests.py (though I'd still prefer to keep that around.)
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 14 Mar 2016 20:11:47 -0400 |
parents | c44f161575ba |
children | 4907f2aed924 |
files | Makefile |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sat Mar 12 12:36:25 2016 +0000 +++ b/Makefile Mon Mar 14 20:11:47 2016 -0400 @@ -1,4 +1,10 @@ PYTHON=python +ifeq ($(HGROOT),) + $(error HGROOT is not set to the root of the hg source tree) +endif +TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) + +HGTESTS=$(HGROOT)/tests help: @echo 'Commonly used make targets:' @@ -9,16 +15,15 @@ all: help tests: - cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS) + cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) test-%: - cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS) $@ + cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ tests-%: - @echo "Path to crew repo is $(CREW) - set this with CREW= if needed." - hg -R $(CREW) checkout $$(echo $@ | sed s/tests-//) && \ - (cd $(CREW) ; $(MAKE) clean ) && \ - cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS) + hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \ + (cd $(HGROOT) ; $(MAKE) clean ) && \ + cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) all-version-tests: tests-tip