[PATCH STABLE V2] makefile: run Rust tests if cargo is installed
Raphaël Gomès
raphael.gomes at octobus.net
Thu Aug 22 12:57:04 UTC 2019
# HG changeset patch
# User Raphaël Gomès <rgomes at octobus.net>
# Date 1566403010 -7200
# Wed Aug 21 17:56:50 2019 +0200
# Branch stable
# Node ID 450f65349bbe7c7a840f7ddd275defbd9f413775
# 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 -r 302dbc9d52be -r 450f65349bbe Makefile
--- 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,7 +111,11 @@
check: tests
tests:
- cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
+ # 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-%:
cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
More information about the Mercurial-devel
mailing list