Submitter | Raphaël Gomès |
---|---|
Date | Aug. 22, 2019, 6:08 a.m. |
Message ID | <8b57d53e4b0c4d84962c.1566454087@alphare-carbon.lan> |
Download | mbox | patch |
Permalink | /patch/41378/ |
State | Superseded |
Headers | show |
Comments
On Thu, Aug 22, 2019 at 08:08:07AM +0200, Raphaël Gomès wrote: > # HG changeset patch > # User Raphaël Gomès <rgomes@octobus.net> > # Date 1566403010 -7200 > # Wed Aug 21 17:56:50 2019 +0200 > # Branch stable > # Node ID 8b57d53e4b0c4d84962c945ee179e3aa6c231c9f > # 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 8b57d53e4b0c 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 [ -x "$$(command -v $(CARGO))" ]; 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) $@ Tabs? Joerg
Patch
diff -r 302dbc9d52be -r 8b57d53e4b0c 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 [ -x "$$(command -v $(CARGO))" ]; 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) $@