# HG changeset patch # User Raphaël Gomès # Date 2019-08-21 15:56:50 # Node ID 7521e6d18057bfc41614d63c85424c50ee114cdf # Parent 302dbc9d52beeb2ef677aa18b3fa005bbce2134e 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. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ export LANGUAGE=C export LC_ALL=C TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS) +CARGO = cargo # Set this to e.g. "mingw32" to use a non-default compiler. COMPILER= @@ -110,6 +111,10 @@ dist-notests: doc MANIFEST.in check: tests tests: + # Run Rust tests if cargo is installed + if command -v $(CARGO) >/dev/null 2>&1; then \ + cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \ + fi cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) test-%: