Makefile
changeset 1879 bd5c2922a8ad
parent 1839 1bc5e62fc0c7
child 1883 ebf146c77709
equal deleted inserted replaced
1878:c44f161575ba 1879:bd5c2922a8ad
     1 PYTHON=python
     1 PYTHON=python
       
     2 ifeq ($(HGROOT),)
       
     3   $(error HGROOT is not set to the root of the hg source tree)
       
     4 endif
       
     5 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
       
     6 
       
     7 HGTESTS=$(HGROOT)/tests
     2 
     8 
     3 help:
     9 help:
     4 	@echo 'Commonly used make targets:'
    10 	@echo 'Commonly used make targets:'
     5 	@echo '  tests              - run all tests in the automatic test suite'
    11 	@echo '  tests              - run all tests in the automatic test suite'
     6 	@echo '  all-version-tests - run all tests against many hg versions'
    12 	@echo '  all-version-tests - run all tests against many hg versions'
     7 	@echo '  tests-%s           - run all tests in the specified hg version'
    13 	@echo '  tests-%s           - run all tests in the specified hg version'
     8 
    14 
     9 all: help
    15 all: help
    10 
    16 
    11 tests:
    17 tests:
    12 	cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS)
    18 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
    13 
    19 
    14 test-%:
    20 test-%:
    15 	cd tests && $(PYTHON) run-tests.py --with-hg=`which hg` $(TESTFLAGS) $@
    21 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@
    16 
    22 
    17 tests-%:
    23 tests-%:
    18 	@echo "Path to crew repo is $(CREW) - set this with CREW= if needed."
    24 	hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
    19 	hg -R $(CREW) checkout $$(echo $@ | sed s/tests-//) && \
    25 	(cd $(HGROOT) ; $(MAKE) clean ) && \
    20 	(cd $(CREW) ; $(MAKE) clean ) && \
    26 	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
    21 	cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS)
       
    22 
    27 
    23 all-version-tests: tests-tip
    28 all-version-tests: tests-tip
    24 
    29 
    25 .PHONY: tests all-version-tests
    30 .PHONY: tests all-version-tests