Patchwork [2,of,2] Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS

login
register
mail settings
Submitter Augie Fackler
Date March 3, 2015, 7:36 p.m.
Message ID <519156f2556efeb54b6f.1425411364@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7886/
State Accepted
Headers show

Comments

Augie Fackler - March 3, 2015, 7:36 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1423081033 18000
#      Wed Feb 04 15:17:13 2015 -0500
# Node ID 519156f2556efeb54b6fffdb5a398cd88fbb8502
# Parent  a94467d7f4422eaf79cea5671d57eb3ec8fecaf4
Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS

I keep wanting to run 'make tests', but I forget to set TESTFLAGS='-j
16' or whatever is reasonable for my machine. This lets me just set it
once in my shell settings and forget it.
Matt Mackall - March 3, 2015, 10:15 p.m.
On Tue, 2015-03-03 at 14:36 -0500, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1423081033 18000
> #      Wed Feb 04 15:17:13 2015 -0500
> # Node ID 519156f2556efeb54b6fffdb5a398cd88fbb8502
> # Parent  a94467d7f4422eaf79cea5671d57eb3ec8fecaf4
> Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
> 
> I keep wanting to run 'make tests', but I forget to set TESTFLAGS='-j
> 16' or whatever is reasonable for my machine. This lets me just set it
> once in my shell settings and forget it.

These are queued for default, thanks.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@  PYFILES:=$(shell find mercurial hgext do
 DOCFILES=mercurial/help/*.txt
 export LANGUAGE=C
 export LC_ALL=C
+TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
 
 # Set this to e.g. "mingw32" to use a non-default compiler.
 COMPILER=