Bug 1309060 - Run |mach python-test| in parallel from make check, r=gps
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 11 Oct 2016 16:06:35 -0400
changeset 322714 55a41c5e8e88010ea8a539c009f27b7b14988700
parent 322713 083a65f9547140f0da619a17ef87f28bf8e36d8b
child 322715 3e92691272d3139d0f428bf7499bc65f7318f540
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +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 \