changeset 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 302dbc9d52be
children 50e25f30da9c 0363bb086c57
files Makefile
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Aug 16 15:41:53 2019 +0300
+++ b/Makefile	Wed Aug 21 17:56:50 2019 +0200
@@ -16,6 +16,7 @@
 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 @@
 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-%: