2010-08-10 23:59:18 +04:00
|
|
|
# Additional mailnews targets to call automated test suites
|
|
|
|
include $(topsrcdir)/mailnews/testsuite-targets.mk
|
|
|
|
|
|
|
|
# Instructions below this line are for mail/ specific tests.
|
|
|
|
|
|
|
|
MOZMILLDIR=$(DEPTH)/mozilla/_tests/mozmill
|
2011-08-18 13:10:55 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
VIRTUALENV_BIN = $(MOZMILLDIR)/../mozmill-virtualenv/Scripts
|
|
|
|
else
|
|
|
|
VIRTUALENV_BIN = $(MOZMILLDIR)/../mozmill-virtualenv/bin
|
|
|
|
endif
|
|
|
|
MOZMILLPYTHON = $(call core_abspath,$(VIRTUALENV_BIN)/python$(BIN_SUFFIX))
|
2010-08-10 23:59:18 +04:00
|
|
|
|
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
# Mac options
|
|
|
|
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
APP_NAME := $(APP_NAME)Debug
|
|
|
|
endif
|
|
|
|
PROGRAM = ../../../$(DIST)/$(APP_NAME).app/
|
|
|
|
else
|
|
|
|
# Non-mac options
|
|
|
|
PROGRAM = ../../../$(DIST)/bin/thunderbird$(BIN_SUFFIX)
|
|
|
|
endif
|
|
|
|
|
2011-08-18 13:10:55 +04:00
|
|
|
# PYTHONHOME messes very badly with virtualenv setups, so unset it.
|
2010-08-10 23:59:18 +04:00
|
|
|
mozmill::
|
2011-08-18 13:10:55 +04:00
|
|
|
unset PYTHONHOME && cd $(MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET= \
|
|
|
|
$(MOZMILLPYTHON) runtestlist.py --list=mozmilltests.list \
|
|
|
|
--binary=$(PROGRAM) \
|
2010-08-10 23:59:18 +04:00
|
|
|
--dir=$(call core_abspath,$(topsrcdir))/mail/test/mozmill \
|
|
|
|
--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
|
|
|
|
$(MOZMILL_EXTRA)
|
|
|
|
|
|
|
|
mozmill-one::
|
2011-08-18 13:10:55 +04:00
|
|
|
unset PYTHONHOME && cd $(MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET= \
|
|
|
|
$(MOZMILLPYTHON) runtest.py \
|
2010-08-10 23:59:18 +04:00
|
|
|
--test=$(call core_abspath,$(topsrcdir))/mail/test/mozmill/$(SOLO_TEST) \
|
|
|
|
--binary=$(PROGRAM) \
|
|
|
|
--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
|
|
|
|
$(MOZMILL_EXTRA)
|
|
|
|
|
2010-09-27 14:20:47 +04:00
|
|
|
# XXX The mozilla/testing/testsuite-targets.mk doesn't really allow for hooks
|
|
|
|
# outside of itself. Therefore we replicate the functionality we need here,
|
|
|
|
# calling into the relevant mozilla dirs when necessary for the core tests.
|
2010-08-10 23:59:18 +04:00
|
|
|
ifndef UNIVERSAL_BINARY
|
|
|
|
PKG_STAGE = $(DIST)/test-package-stage
|
2010-09-27 14:20:47 +04:00
|
|
|
package-tests:: stage-mozilla-tests stage-mozmill
|
2010-08-10 23:59:18 +04:00
|
|
|
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)"
|
2010-10-03 07:40:05 +04:00
|
|
|
ifndef UNIVERSAL_BINARY
|
|
|
|
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
|
|
|
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
|
2010-08-10 23:59:18 +04:00
|
|
|
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
|
|
|
|
|
2010-09-27 14:20:47 +04:00
|
|
|
# Of the core tests, we only currently support xpcshell. Unfortunately
|
|
|
|
# some of the required xpcshell bits are packaged by mochitest, so we have to
|
|
|
|
# package those as well.
|
|
|
|
stage-mozilla-tests: make-stage-dir
|
|
|
|
$(MAKE) -C $(DEPTH)/mozilla/testing/mochitest stage-package
|
|
|
|
$(MAKE) -C $(DEPTH)/mozilla/testing/xpcshell stage-package
|
|
|
|
|
|
|
|
# Although we should probably depend on make-stage-dir here, we don't as the
|
|
|
|
# make-stage-dir actually removes the package directory for us. Given that we
|
|
|
|
# are running stage-mozilla-tests which calls testing/testsuite-targets.mk which
|
|
|
|
# does do this for some tests, then we're actually fine.
|
2010-08-10 23:59:18 +04:00
|
|
|
stage-mozmill: make-stage-dir
|
|
|
|
$(MAKE) -C $(DEPTH)/mail/test/mozmill stage-package
|
|
|
|
|
|
|
|
.PHONY: \
|
|
|
|
package-tests make-stage-dir stage-mozmill
|