Bug 1309060 - Run |mach python-test| in parallel from make check, r?gps
This duplicates code in client.mk to retrieve the number of cores. We should
probably just get the build system to define a global variable for this, but
I don't know how to do that.
MozReview-Commit-ID: CfAGbVMJXXT
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -308,17 +308,18 @@ TEST_EXTENSIONS := \
$(NULL)
stage-extensions: make-stage-dir
$(NSINSTALL) -D $(PKG_STAGE)/extensions/
@$(foreach ext,$(TEST_EXTENSIONS), cp -RL $(DIST)/xpi-stage/$(ext) $(PKG_STAGE)/extensions;)
check::
- @$(topsrcdir)/mach --log-no-times python-test
+ $(eval cores=$(shell $(PYTHON) -c 'import multiprocessing; print(multiprocessing.cpu_count())'))
+ @$(topsrcdir)/mach --log-no-times python-test -j$(cores)
.PHONY: \
reftest \
crashtest \
xpcshell-tests \
jstestbrowser \
package-tests \