Makefile
author Pierre-Yves David <pierre-yves.david@fb.com>
Sat, 12 Mar 2016 18:42:16 +0000
changeset 1887 68125d026b07
parent 1883 ebf146c77709
child 1893 9d1157fcdc6c
permissions -rw-r--r--
push: hackish handeling of new branch head from phase move The current head checking mechanism is not expecting "head change" from phase movement. Topic allows that, changeset with a topic moving to public can create a new head. We introduce a hack to double check that no head were added at the transaction level to work around this.

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