bug 518641 - "make package-tests" doesn't work right on OS X universal builds. r=bsmedberg

This patch causes us to build archictecture-specific test packages in the
OS X universal build postflight makefile, and unifies them into a universal
test-package (containing the same test files, but universal binaries), and
then special-cases the "package-tests" target to use that pre-generated
test package in the universal build case.

--HG--
extra : rebase_source : 41d1f3fe887a2dbdee3ad560ab46bcb261883690
This commit is contained in:
Ted Mielczarek 2009-09-29 08:31:50 -04:00
parent 555cf95f52
commit 735e15be83
3 changed files with 25 additions and 1 deletions

View File

@ -105,6 +105,9 @@ export::
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
else
# OS X Universal builds will want to call this, so stub it out
package-tests:
endif
include $(topsrcdir)/config/rules.mk

View File

@ -110,3 +110,18 @@ postflight_all:
$(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
# 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
# automation.py differs because it hardcodes a path to dist/bin.
# It doesn't matter which one we use.
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/
if test -d $(DIST_PPC)/test-package-stage -a \
-d $(DIST_X86)/test-package-stage; then \
$(TOPSRCDIR)/build/macosx/universal/unify \
$(DIST_PPC)/test-package-stage \
$(DIST_X86)/test-package-stage \
$(DIST_UNI)/test-package-stage; fi

View File

@ -110,9 +110,15 @@ xpcshell-tests:
# Package up the tests and test harnesses
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
ifndef UNIVERSAL_BINARY
PKG_STAGE = $(DIST)/test-package-stage
package-tests: stage-mochitest stage-reftest stage-xpcshell
else
# This staging area has been built for us by universal/flight.mk
PKG_STAGE = $(DIST)/universal/test-package-stage
endif
package-tests:
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
@(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)