changeset 354:428c819f3135

Makefile: add target for testing against many hg versions at once
author Augie Fackler <durin42@gmail.com>
date Sun, 15 Aug 2010 09:41:28 -0500
parents dd90394cd13b
children 63ddab4ef66c
files Makefile
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -2,15 +2,22 @@
 
 help:
 	@echo 'Commonly used make targets:'
-	@echo '  tests        - run all tests in the automatic test suite'
+	@echo '  tests              - run all tests in the automatic test suite'
+	@echo '  all-version-tests - run all tests against many hg versions'
+	@echo '  tests-%s           - run all tests in the specified hg version'
 
-all: tests
+all: help
 
 tests:
 	cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS)
 
 test-%:
 	cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS) $@
-.PHONY: help all local build doc clean install install-bin install-doc \
-	install-home install-home-bin install-home-doc dist dist-notests tests \
-	update-pot
+
+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)
+
+all-version-tests: tests-1.4.3 tests-1.5.4 tests-1.6.2 tests-tip