Bug 518641 - "make package-tests" doesn't work right on OS X universal builds; (Ev1-CC) Port it to comm-central.
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 04 Mar 2010 13:46:16 +0100
changeset 5067 e8064a410e5b051e89ef75c2abed8ca5432d3b2f
parent 5066 dfcb8184538f17bd813598e2988736973bf49c5d
child 5068 803c436845db922c21a9e069c6a1ba9f689d736b
push idunknown
push userunknown
push dateunknown
bugs518641
Bug 518641 - "make package-tests" doesn't work right on OS X universal builds; (Ev1-CC) Port it to comm-central. r=Callek.
Makefile.in
build/macosx/universal/flight.mk
--- a/Makefile.in
+++ b/Makefile.in
@@ -77,16 +77,19 @@ default export libs clean realclean dist
 
 ifdef ENABLE_TESTS
 check \
 mochitest mochitest-plain mochitest-chrome mochitest-browser-chrome mochitest-a11y \
 reftest crashtest \
 xpcshell-tests \
 package-tests::
 	$(MAKE) -C mozilla $@
+else
+package-tests::
+	$(MAKE) -C mozilla $@
 endif
 
 # http://bugzilla.mozilla.org/show_bug.cgi?id=450485
 MAKE_SYM_STORE_PATH=dist/bin
 ifeq ($(OS_ARCH),Darwin)
 ifdef UNIVERSAL_BINARY
   MAKE_SYM_STORE_PATH=dist/universal
 endif
--- a/build/macosx/universal/flight.mk
+++ b/build/macosx/universal/flight.mk
@@ -113,8 +113,24 @@ ifndef DISABLE_LIGHTNING_INSTALL
 ifndef MOZ_SUNBIRD
 	rm $(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME)/Contents/MacOS/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}/install.rdf \
       $(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME)/Contents/MacOS/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}/install.rdf
 endif
 endif
 endif
 # A universal .dmg can now be produced by making in either architecture's
 # INSTALLER_DIR.
+# Now, repeat the process for the test package.
+	$(MAKE) -C $(OBJDIR_PPC) UNIVERSAL_BINARY= package-tests
+	$(MAKE) -C $(OBJDIR_X86) UNIVERSAL_BINARY= package-tests
+	rm -rf $(DIST_UNI)/test-package-stage
+# automation.py differs because it hardcodes a path to
+# dist/bin. It doesn't matter which one we use.
+	if test -d $(DIST_PPC)/test-package-stage -a                 \
+                -d $(DIST_X86)/test-package-stage; then              \
+           cp $(DIST_PPC)/test-package-stage/mochitest/automation.py \
+             $(DIST_X86)/test-package-stage/mochitest/;              \
+           cp $(DIST_PPC)/test-package-stage/reftest/automation.py   \
+             $(DIST_X86)/test-package-stage/reftest/;                \
+           $(TOPSRCDIR)/mozilla/build/macosx/universal/unify         \
+             $(DIST_PPC)/test-package-stage                          \
+             $(DIST_X86)/test-package-stage                          \
+             $(DIST_UNI)/test-package-stage; fi