3 $description = "Test jobserver.";
5 $details = "These tests are ones that specifically are different when the
6 jobserver feature is available. Most -j tests are the same whether or not
7 jobserver is available, and those appear in the 'parallelism' test suite.";
9 exists $FEATURES{'jobserver'} or return -1;
11 if (!$parallel_jobs) {
15 # Don't put --jobserver-fds into a re-exec'd MAKEFLAGS.
16 # We can't test this directly because there's no way a makefile can
17 # show the value of MAKEFLAGS we were re-exec'd with. We can intuit it
18 # by looking for "disabling jobserver mode" warnings; we should only
19 # get one from the original invocation and none from the re-exec.
20 # See Savannah bug #18124
27 # @echo 'MAKEFLAGS = $(MAKEFLAGS)'
29 @$(MAKE) -j2 -f #MAKEFILE# all
31 # @echo 'MAKEFLAGS = $(MAKEFLAGS)'
34 # @echo 'MAKEFLAGS = $(MAKEFLAGS)'
35 @echo 'FOO = bar' > $@
37 '--no-print-directory -j2', "#MAKE#[1]: warning: -jN forced in submake: disabling jobserver mode.\nall\n");
41 # Test recursion when make doesn't think it exists.
42 # See Savannah bug #39934
43 # Or Red Hat bug https://bugzilla.redhat.com/show_bug.cgi?id=885474
45 open(MAKEFILE,"> Makefile2");
53 default: ; @ #MAKEPATH# -f Makefile2
55 '-j2 --no-print-directory',
56 "#MAKE#[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
57 #MAKE#[1]: Nothing to be done for 'foo'.");