Makefile
changeset 42821 50e25f30da9c
parent 42666 7521e6d18057
child 43289 8d432d3a2d7c
--- a/Makefile	Wed Aug 21 13:14:39 2019 -0700
+++ b/Makefile	Fri Aug 23 17:03:42 2019 -0400
@@ -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-%: