Makefile
author Matt Harbison <matt_harbison@yahoo.com>
Tue, 12 Aug 2014 19:09:53 -0400
branchstable
changeset 1104 cb36a4eb0157
parent 542 ca5bb72d14ae
child 1524 bfbd99b50f8f
permissions -rw-r--r--
evolve: fix the 'grab' alias to work on Windows For some reason, the variable wasn't substituted on Windows in this case. From the test suite: $ hg grab 8 '' is not recognized as an internal or external command,\r (esc) operable program or batch file.\r (esc) This change seems hacky, but there isn't a readily available example of setting up a shell alias like this from a python module to know if there is a better way, and it seems like this is maybe just a convenience for tests, since there is no documentation for the aliases. The local copy of run-tests.py appears to predate the Windows support in the Mercurial repository's version, and fails each test with: The system cannot find the path specified. However, with this change and blacklisting test-simple4server.t, the tests can (mostly) be run on Windows like so: $ ../../hg/tests/run-tests.py --with-hg=../../hg/hg --blacklist windows Skipped test-simple4server.t: blacklisted Warned test-obsolete.t: no result code from test Warned test-tutorial.t: no result code from test Warned test-evolve.t: no result code from test Warned test-userguide.t: no result code from test Warned test-sharing.t: no result code from test Warned test-drop.t: no result code from test Failed test-prune.t: output changed # Ran 41 tests, 1 skipped, 6 warned, 1 failed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
PYTHON=python
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
HG=`which hg`
542
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
     3
VERSION=$(shell python setup.py --version)
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
     4
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
help:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
	@echo 'Commonly used make targets:'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
	@echo '  tests              - run all tests in the automatic test suite'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     9
	@echo '  all-version-tests - run all tests against many hg versions'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
	@echo '  tests-%s           - run all tests in the specified hg version'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
all: help
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
tests:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
	cd tests && $(PYTHON) run-tests.py --with-hg=$(HG) $(TESTFLAGS)
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    16
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
test-%:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
	cd tests && $(PYTHON) run-tests.py --with-hg=$(HG) $(TESTFLAGS) $@
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
tests-%:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
	@echo "Path to crew repo is $(CREW) - set this with CREW= if needed."
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
	hg -R $(CREW) checkout $$(echo $@ | sed s/tests-//) && \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
	(cd $(CREW) ; $(MAKE) clean ) && \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
	cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS)
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
all-version-tests: tests-1.3.1 tests-1.4.3 tests-1.5.4 \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
                   tests-1.6.4 tests-1.7.5 tests-1.8 tests-tip
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    29
deb-prepare:
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    30
	python setup.py sdist --dist-dir ..
542
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    31
	mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    32
	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    33
	rm -rf ../mercurial-evolve_$(VERSION).orig
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    34
	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    35
	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    36
	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    37
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
.PHONY: tests all-version-tests