[PATCH STABLE V2] makefile: run Rust tests if cargo is installed

Yuya Nishihara yuya at tcha.org
Thu Aug 22 19:11:20 EDT 2019


On Thu, 22 Aug 2019 14:57:04 +0200, Raphaël Gomès wrote:
> # 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

Queued, thanks.

> 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

Replaced tab with spaces for the comment line.

> +	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);

Dropped useless ;


More information about the Mercurial-devel mailing list