equal
deleted
inserted
replaced
111 check: tests |
111 check: tests |
112 |
112 |
113 tests: |
113 tests: |
114 # Run Rust tests if cargo is installed |
114 # Run Rust tests if cargo is installed |
115 if command -v $(CARGO) >/dev/null 2>&1; then \ |
115 if command -v $(CARGO) >/dev/null 2>&1; then \ |
116 cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \ |
116 $(MAKE) rust-tests; \ |
117 fi |
117 fi |
118 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) |
118 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) |
119 |
119 |
120 test-%: |
120 test-%: |
121 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ |
121 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ |
124 @echo Looking for Python $* in $(HGPYTHONS) |
124 @echo Looking for Python $* in $(HGPYTHONS) |
125 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \ |
125 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \ |
126 cd $$(mktemp --directory --tmpdir) && \ |
126 cd $$(mktemp --directory --tmpdir) && \ |
127 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python ) |
127 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python ) |
128 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS) |
128 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS) |
|
129 |
|
130 rust-tests: py_feature = $(shell $(PYTHON) -c \ |
|
131 'import sys; print(["python27-bin", "python3-bin"][sys.version_info[0] >= 3])') |
|
132 rust-tests: |
|
133 cd $(HGROOT)/rust/hg-cpython \ |
|
134 && $(CARGO) test --quiet --all \ |
|
135 --no-default-features --features "$(py_feature)" |
129 |
136 |
130 check-code: |
137 check-code: |
131 hg manifest | xargs python contrib/check-code.py |
138 hg manifest | xargs python contrib/check-code.py |
132 |
139 |
133 format-c: |
140 format-c: |
246 --resources contrib/packaging/macosx/ \ |
253 --resources contrib/packaging/macosx/ \ |
247 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg |
254 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg |
248 |
255 |
249 .PHONY: help all local build doc cleanbutpackages clean install install-bin \ |
256 .PHONY: help all local build doc cleanbutpackages clean install install-bin \ |
250 install-doc install-home install-home-bin install-home-doc \ |
257 install-doc install-home install-home-bin install-home-doc \ |
251 dist dist-notests check tests check-code format-c update-pot \ |
258 dist dist-notests check tests rust-tests check-code format-c \ |
|
259 update-pot \ |
252 $(packaging_targets) \ |
260 $(packaging_targets) \ |
253 osx |
261 osx |