Bug 601113 - Port |Bug 543800 - package chrome style tests into .jar file for local testing| to comm-central; (Cv1a-TB) Just port it.
authorSerge Gautherie <sgautherie.bz@free.fr>
Sun, 03 Oct 2010 05:40:05 +0200
changeset 6471 7a7aa0052f042cb2034800915c27da0afeb5dc81
parent 6470 51fbb624b47a91db0a9c1f4f99932561e8322b56
child 6472 1575284f0f7a8a3daf9df7a3036fd4c0894d8008
push idunknown
push userunknown
push dateunknown
bugs601113, 543800
Bug 601113 - Port |Bug 543800 - package chrome style tests into .jar file for local testing| to comm-central; (Cv1a-TB) Just port it. r=standard8.
mail/build.mk
mail/testsuite-targets.mk
--- a/mail/build.mk
+++ b/mail/build.mk
@@ -95,13 +95,11 @@ install::
 source-package::
 	@$(MAKE) -C mail/installer source-package
 
 upload::
 	@$(MAKE) -C mail/installer upload
 
 ifdef ENABLE_TESTS
 include $(srcdir)/mail/testsuite-targets.mk
-else
-package-tests::
 endif
 
 endif # COMM_BUILD
--- a/mail/testsuite-targets.mk
+++ b/mail/testsuite-targets.mk
@@ -38,18 +38,23 @@ ifndef UNIVERSAL_BINARY
 PKG_STAGE = $(DIST)/test-package-stage
 package-tests:: stage-mozilla-tests stage-mozmill
 else
 # This staging area has been built for us by universal/flight.mk
 PKG_STAGE = $(DIST)/universal/test-package-stage
 endif
 
 package-tests::
+	@rm -f "$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)"
+ifndef UNIVERSAL_BINARY
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
-	@rm -f "$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)"
+else
+	#building tests.jar (bug 543800) fails on unify, so we build tests.jar after unify is run
+	$(MAKE) -C $(DEPTH)/mozilla/testing/mochitest stage-chromejar PKG_STAGE=$(DIST)/universal
+endif
 	cd $(PKG_STAGE) && \
 	  zip -r9D "$(call core_abspath,$(DIST)/$(PKG_PATH)$(TEST_PACKAGE))" *
 
 make-stage-dir:
 	rm -rf $(PKG_STAGE) && $(NSINSTALL) -D $(PKG_STAGE) && $(NSINSTALL) -D $(PKG_STAGE)/bin && $(NSINSTALL) -D $(PKG_STAGE)/bin/components && $(NSINSTALL) -D $(PKG_STAGE)/certs
 
 # Of the core tests, we only currently support xpcshell. Unfortunately
 # some of the required xpcshell bits are packaged by mochitest, so we have to