comparison Makefile @ 42805:7521e6d18057 stable

makefile: run Rust tests if cargo is installed While no particular minimum toolchain version is targeted as of yet, this serves as a first step to make more people/machines run the Rust tests.
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 21 Aug 2019 17:56:50 +0200
parents ec7b478f1bf8
children 8d432d3a2d7c
comparison
equal deleted inserted replaced
42739:302dbc9d52be 42805:7521e6d18057
14 DOCFILES=mercurial/help/*.txt 14 DOCFILES=mercurial/help/*.txt
15 export LANGUAGE=C 15 export LANGUAGE=C
16 export LC_ALL=C 16 export LC_ALL=C
17 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) 17 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
18 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS) 18 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
19 CARGO = cargo
19 20
20 # Set this to e.g. "mingw32" to use a non-default compiler. 21 # Set this to e.g. "mingw32" to use a non-default compiler.
21 COMPILER= 22 COMPILER=
22 23
23 COMPILERFLAG_tmp_ = 24 COMPILERFLAG_tmp_ =
108 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist 109 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
109 110
110 check: tests 111 check: tests
111 112
112 tests: 113 tests:
114 # Run Rust tests if cargo is installed
115 if command -v $(CARGO) >/dev/null 2>&1; then \
116 cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \
117 fi
113 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) 118 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
114 119
115 test-%: 120 test-%:
116 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ 121 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
117 122