Makefile
changeset 1879 bd5c2922a8ad
parent 1839 1bc5e62fc0c7
child 1883 ebf146c77709
--- 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