2012-05-30 20:48:24 +04:00
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
2013-11-26 03:03:48 +04:00
MOZMILLDIR = $( DEPTH) /_tests/mozmill
2011-08-18 13:10:55 +04:00
i f e q ( $( OS_ARCH ) , W I N N T )
VIRTUALENV_BIN = $( MOZMILLDIR) /../mozmill-virtualenv/Scripts
e l s e
VIRTUALENV_BIN = $( MOZMILLDIR) /../mozmill-virtualenv/bin
e n d i f
2013-10-22 19:20:33 +04:00
MOZMILLPYTHON = $( abspath $( VIRTUALENV_BIN) /python$( BIN_SUFFIX) )
2010-08-10 23:59:18 +04:00
i f e q ( c o c o a , $( MOZ_WIDGET_TOOLKIT ) )
# Mac options
APP_NAME = $( MOZ_APP_DISPLAYNAME)
i f d e f M O Z _ D E B U G
APP_NAME := $( APP_NAME) Debug
e n d i f
2014-08-20 09:00:22 +04:00
BINARY = ../../$( DIST) /$( APP_NAME) .app/
2010-08-10 23:59:18 +04:00
e l s e
# Non-mac options
2014-08-20 09:00:22 +04:00
BINARY = ../../$( DIST) /bin/thunderbird$( BIN_SUFFIX)
2010-08-10 23:59:18 +04:00
e n d i f
2011-09-07 00:40:45 +04:00
check-no-solo = $( foreach solo,SOLO_TEST SOLO_FILE,$( if $( $( solo) ) ,$( error $( subst SOLOVAR,$( solo) ,$( 1) ) ) ) )
find-solo-test = $( if $( and $( SOLO_TEST) ,$( SOLO_FILE) ) ,$( error Both SOLO_TEST and SOLO_FILE are specified. You may only specify one.) ,$( if $( SOLO_TEST) ,$( SOLO_TEST) ,$( if $( SOLO_FILE) ,$( SOLO_FILE) ,$( error SOLO_TEST or SOLO_FILE needs to be specified.) ) ) )
2011-08-18 13:10:55 +04:00
# PYTHONHOME messes very badly with virtualenv setups, so unset it.
2011-09-07 00:40:45 +04:00
mozmill :
$( call check-no-solo,SOLOVAR is specified. Perhaps you meant mozmill-one.)
2011-08-18 13:10:55 +04:00
unset PYTHONHOME && cd $( MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET = \
$( MOZMILLPYTHON) runtestlist.py --list= mozmilltests.list \
2013-11-26 03:03:48 +04:00
--binary= $( BINARY) \
--dir= $( abspath $( topsrcdir) ) /../mail/test/mozmill \
2013-10-22 19:20:33 +04:00
--symbols-path= $( abspath $( DIST) /crashreporter-symbols) \
--plugins-path= $( abspath $( DIST) /plugins) \
2010-08-10 23:59:18 +04:00
$( MOZMILL_EXTRA)
2011-09-07 00:40:45 +04:00
mozmill-one : solo -test = $( find -solo -test )
mozmill-one :
2011-08-18 13:10:55 +04:00
unset PYTHONHOME && cd $( MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET = \
$( MOZMILLPYTHON) runtest.py \
2013-11-26 03:03:48 +04:00
--test= $( abspath $( topsrcdir) ) /../mail/test/mozmill/$( solo-test) \
--binary= $( BINARY) \
2013-10-22 19:20:33 +04:00
--symbols-path= $( abspath $( DIST) /crashreporter-symbols) \
--plugins-path= $( abspath $( DIST) /plugins) \
2010-08-10 23:59:18 +04:00
$( MOZMILL_EXTRA)
2013-11-26 03:03:48 +04:00
# We need to add the mozmill tests to the package for tests.
2010-08-10 23:59:18 +04:00
i f n d e f U N I V E R S A L _ B I N A R Y
2014-05-16 10:52:53 +04:00
# If Lightning is enabled, also stage the lightning extension
i f d e f M O Z _ C A L E N D A R
2013-11-26 03:03:48 +04:00
package-tests : stage -calendar
2014-05-16 10:52:53 +04:00
e n d i f
2013-11-26 03:03:48 +04:00
package-tests : stage -mozmill
2010-08-10 23:59:18 +04:00
e n d i f
stage-mozmill : make -stage -dir
$( MAKE) -C $( DEPTH) /mail/test/mozmill stage-package
2014-05-16 10:52:53 +04:00
stage-calendar : make -stage -dir
$( MAKE) -C $( DEPTH) /calendar/lightning stage-package
2013-11-26 03:03:48 +04:00
.PHONY : stage -mozmill stage -calendar