mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 1207912 - Use multiple rules for test archive generation; r=glandium
Previously, we had a single make target and rule for generating all test archives. These tasks can be performed in parallel. This commit refactors the make file to add multiple targets for each archive and thus enables test archives to be generated concurrently. On my MacBook Pro, this reduces `make package-tests -j8` from ~78s to ~50s, a reduction of ~28s, or ~36%. Reduction on machines without SSDs (like many builders in automation) will likely be less. Although, the page cache should service most file reads during archiving since these files were just staged, so hopefully the gains are in the same ballpark. --HG-- extra : commitid : 1PsEuE8KS7J extra : rebase_source : b4ed9e593775d96a994b7076c6814d18ca277d8e extra : histedit_source : f33af390df36d8ffe98df4f4329fa50a7cde6b0c
This commit is contained in:
parent
935d1d8b76
commit
fda95b5b85
@ -424,19 +424,32 @@ test-packages-manifest:
|
||||
$(call PKG_ARG,common) \
|
||||
$(foreach pkg,$(TEST_PKGS),$(call PKG_ARG,$(pkg)))
|
||||
|
||||
package-tests: stage-all
|
||||
package-tests-prepare-dest:
|
||||
@rm -f '$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)'
|
||||
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
||||
# Exclude harness specific directories when generating the common zip.
|
||||
$(MKDIR) -p $(abspath $(DIST))/$(PKG_PATH) && \
|
||||
|
||||
package-tests-mozharness: stage-all package-tests-prepare-dest
|
||||
cd $(topsrcdir)/testing/ && \
|
||||
zip -rq9D $(abspath $(DIST))/$(PKG_PATH)mozharness.zip mozharness && \
|
||||
zip -rq9D $(abspath $(DIST))/$(PKG_PATH)mozharness.zip mozharness
|
||||
package-tests: package-tests-mozharness
|
||||
|
||||
package-tests-common: stage-all package-tests-prepare-dest
|
||||
cd $(abspath $(PKG_STAGE)) && \
|
||||
zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(TEST_PACKAGE)' \
|
||||
* -x \*/.mkdir.done \*.pyc $(foreach name,$(TEST_PKGS),$(name)\*) && \
|
||||
$(foreach name,$(TEST_PKGS),rm -f '$(DIST)/$(PKG_PATH)$(PKG_BASENAME).'$(name)'.tests.zip' && \
|
||||
zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(PKG_BASENAME).'$(name)'.tests.zip' \
|
||||
$(name) -x \*/.mkdir.done \*.pyc ;)
|
||||
* -x \*/.mkdir.done \*.pyc $(foreach name,$(TEST_PKGS),$(name)\*)
|
||||
package-tests: package-tests-common
|
||||
|
||||
define package_archive
|
||||
package-tests-$(1): stage-all package-tests-prepare-dest
|
||||
rm -f '$$(DIST)/$$(PKG_PATH)$$(PKG_BASENAME).$(1).tests.zip' && \
|
||||
cd $$(abspath $(PKG_STAGE)) && \
|
||||
zip -rq9D '$$(abspath $$(DIST))/$$(PKG_PATH)$$(PKG_BASENAME).$(1).tests.zip' \
|
||||
$(1) -x \*/.mkdir.done \*.pyc ;
|
||||
.PHONY += package-tests-$(1)
|
||||
package-tests: package-tests-$(1)
|
||||
endef
|
||||
|
||||
$(foreach name,$(TEST_PKGS),$(eval $(call package_archive,$(name))))
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
stage-all: stage-android
|
||||
@ -605,6 +618,9 @@ stage-instrumentation-tests: make-stage-dir
|
||||
xpcshell-tests \
|
||||
jstestbrowser \
|
||||
package-tests \
|
||||
package-tests-prepare-dest \
|
||||
package-tests-mozharness \
|
||||
package-tests-common \
|
||||
make-stage-dir \
|
||||
stage-all \
|
||||
stage-b2g \
|
||||
|
Loading…
x
Reference in New Issue
Block a user