view Makefile @ 1892:b1fadc089b82

update: change default update destination to take topic in account When within a branch update to ngtip(branch). When within a topic update to the top topic.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 13 Mar 2016 12:29:43 +0000
parents ebf146c77709
children 9d1157fcdc6c
line wrap: on
line source

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:'
	@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: help

tests:
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)

test-%:
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@

tests-%:
	hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
	(cd $(HGROOT) ; $(MAKE) clean ) && \
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)

all-version-tests: tests-3.7 tests-tip

.PHONY: tests all-version-tests