So I can see a consistent improvement by ~40s for 'make -j4 CPU_COUNT=4 test', going down from ~4m to 3m30s. The patch at https://codereview.appspot.com/547680043 explains that this is due to parallelism in input/regression/lilypond-book/. I see no influence on 'make -j4 CPU_COUNT=4 doc', staying flat at around 29m on my laptop.
If only looking at input/regression/lilypond-book/, can't we just use different 'lily_output_dir's for each target? That should still allow us to run in parallel without the locking solution proposed in this patch. Correct me if I'm wrong: This should have no negative influence since files from input/regression/lilypond-book/ are not reused in other parts of the tests / documentation. Another solution might be serialize only lilypond-book and let tex et al. run concurrently. That should also be harmless, right? In total I'm still not convinced by this complexity. https://codereview.appspot.com/555360043/
