summaryrefslogtreecommitdiff
path: root/tests/scripts/features/parallelism
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2011-09-18 23:39:26 +0000
committerPaul Smith <psmith@gnu.org>2011-09-18 23:39:26 +0000
commitd472624f3300fa454e8271fb7647971877de8d89 (patch)
treef7468e7568b6294f09fd7b187e0cb3fd602fac91 /tests/scripts/features/parallelism
parent0369a938254747fa2ab9ea09fe48b9c84ae7e19e (diff)
downloadgunmake-d472624f3300fa454e8271fb7647971877de8d89.tar.gz
When we re-exec the master makefile in a jobserver environment, ensure
that MAKEFLAGS is set properly so the re-exec'd make runs in parallel. See Savannah bug #33873.
Diffstat (limited to 'tests/scripts/features/parallelism')
-rw-r--r--tests/scripts/features/parallelism17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism
index 22e4aeb..909c979 100644
--- a/tests/scripts/features/parallelism
+++ b/tests/scripts/features/parallelism
@@ -167,6 +167,23 @@ inc.mk:
rmfiles('inc.mk');
+# TEST #11: Make sure -jN from MAKEFLAGS is processed even when we re-exec
+# See Savannah bug #33873
+
+$extraENV{MAKEFLAGS} = '-j4';
+
+run_make_test(q!
+things = thing1 thing2
+all: $(things)
+$(things):; @echo '$@ start'; sleep 1; echo '$@ end'
+-include inc.mk
+inc.mk: ; @touch $@
+!,
+ '', "thing1 start\nthing2 start\nthing1 end\nthing2 end\n");
+
+delete $extraENV{MAKEFLAGS};
+rmfiles('inc.mk');
+
if ($all_tests) {
# Implicit files aren't properly recreated during parallel builds
# Savannah bug #26864