summaryrefslogtreecommitdiff
path: root/runtests.SH
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-12-08 20:26:04 +0000
committerDavid Mitchell <davem@iabyn.com>2014-12-08 20:26:04 +0000
commit8b51b1ff0a9db54985af9f69c82433388daab5c7 (patch)
tree4968775795f60a5f33dcf7e1b1dfd16283c80695 /runtests.SH
parentc28567dd425f3fcf4adb161dd702c84b5b4380ee (diff)
downloadperl-8b51b1ff0a9db54985af9f69c82433388daab5c7.tar.gz
avoid 'jobserver unavailable:' warnings
Under GNU make, an interaction between the top-level 'make -j N harness' and a make invoked by cpan/ExtUtils-Constant/t/Constant.t causes warnings like: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. Fix this by stopping MAKEFLAGS being inherited by the children. The other option, of prefixing all the '$(RUN_TESTS) choose' lines in Makefile.SH with '+' is, I suspect, not portable.
Diffstat (limited to 'runtests.SH')
-rwxr-xr-xruntests.SH15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtests.SH b/runtests.SH
index 78c879bb63..71f41d1d42 100755
--- a/runtests.SH
+++ b/runtests.SH
@@ -28,6 +28,21 @@ $spitshell >>runtests <<'!NO!SUBS!'
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
+# Avoid "warning: jobserver unavailable: using -j1." warnings under GNU make.
+# When gmake -j N spawns a child, it passes
+# MAKEFLAGS=" --jobserver-fds=3,4 -j".
+# in the environment. Also, if make recognises that the child is another
+# make (e.g. it's invoked as $(MAKE) or +command), it keeps open fd's 3
+# and 4 to allow the child process to access the job server. Otherwise,
+# those fd's aren't kept open.
+# In the case where one does 'make -j 16 test_harness', this script is
+# called with MAKEFLAGS set, but fd's 3 and 4 closed. Later when
+# descendents of this script run cpan/ExtUtils-Constant/t/Constant.t
+# which itelf invokes make, the warnings ensue.
+
+unset MAKEFLAGS
+
+
case $# in
0)
echo "runtests tty_flag ..."