Bug 1309060 - Run |mach python-test| in parallel from make check, r?gps draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 11 Oct 2016 16:06:35 -0400
changeset 439817 70a329125c3d267564c31720ce4cfb64e9b98de3
parent 439816 de5f5a652e4249a02add8b01e54b372f5ef9fd56
child 537266 06c26ffeb735dcbd77dcb14b43f6ef3353ed114b
push id36108
push userahalberstadt@mozilla.com
push dateWed, 16 Nov 2016 17:56:38 +0000
reviewersgps
bugs1309060
milestone53.0a1
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
testing/testsuite-targets.mk
--- 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 \