2005-11-29 16:24:42 +00:00
|
|
|
#
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
2006-01-27 20:56:16 +00:00
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Mozilla.org.
|
2005-11-29 16:24:42 +00:00
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2005
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
2006-01-27 20:56:16 +00:00
|
|
|
# Boris Zbarsky <bzbarsky@mit.edu> (Original author)
|
2005-11-29 16:24:42 +00:00
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
2006-01-27 20:56:16 +00:00
|
|
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2005-11-29 16:24:42 +00:00
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
2006-01-27 20:56:16 +00:00
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
2009-01-22 18:39:02 +00:00
|
|
|
DEPTH = ../..
|
2006-01-27 20:56:16 +00:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
2005-11-29 16:24:42 +00:00
|
|
|
|
2009-01-22 18:39:02 +00:00
|
|
|
MODULE = testing_xpcshell
|
2005-11-29 16:24:42 +00:00
|
|
|
|
2006-09-13 16:33:39 +00:00
|
|
|
# Here's how you let the build system know there are tests in the
|
|
|
|
# "example" folder:
|
2006-10-02 17:36:15 +00:00
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
DIRS += example
|
2006-09-13 16:33:39 +00:00
|
|
|
endif
|
|
|
|
|
2006-01-27 20:56:16 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2009-03-21 15:20:00 +00:00
|
|
|
|
|
|
|
# Harness files from the srcdir
|
|
|
|
TEST_HARNESS_FILES := \
|
|
|
|
runxpcshelltests.py \
|
2010-03-13 18:57:06 +00:00
|
|
|
remotexpcshelltests.py \
|
2009-03-21 15:20:00 +00:00
|
|
|
head.js \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-05-14 11:37:40 +00:00
|
|
|
# Extra files needed from $(topsrcdir)/build
|
|
|
|
EXTRA_BUILD_FILES := \
|
|
|
|
automationutils.py \
|
2011-05-20 15:54:01 +00:00
|
|
|
manifestparser.py \
|
2011-06-21 12:12:40 +00:00
|
|
|
mozinfo.py \
|
2009-05-14 11:37:40 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2010-03-24 17:51:17 +00:00
|
|
|
# And files for running xpcshell remotely from $(topsrcdir)/build/mobile
|
|
|
|
MOBILE_BUILD_FILES := \
|
|
|
|
devicemanager.py \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-03-21 15:20:00 +00:00
|
|
|
# Components / typelibs that don't get packaged with
|
|
|
|
# the build, but that we need for the test harness.
|
|
|
|
TEST_HARNESS_COMPONENTS := \
|
|
|
|
httpd.js \
|
2010-06-23 00:44:44 +00:00
|
|
|
httpd.manifest \
|
2009-03-21 15:20:00 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# Rules for staging the necessary harness bits for a test package
|
|
|
|
PKG_STAGE = $(DIST)/test-package-stage
|
|
|
|
|
2011-05-20 15:54:01 +00:00
|
|
|
libs::
|
|
|
|
$(INSTALL) $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell
|
|
|
|
cp $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell/all-test-dirs.list
|
|
|
|
|
2011-06-21 12:12:40 +00:00
|
|
|
# Run selftests
|
|
|
|
check::
|
|
|
|
OBJDIR=$(DEPTH) $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
|
|
|
-I$(topsrcdir)/build $(srcdir)/selftest.py
|
|
|
|
|
2009-03-21 15:20:00 +00:00
|
|
|
stage-package:
|
|
|
|
$(NSINSTALL) -D $(PKG_STAGE)/xpcshell/tests
|
|
|
|
@(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-05-14 11:37:40 +00:00
|
|
|
@(cd $(topsrcdir)/build && tar $(TAR_CREATE_FLAGS) - $(EXTRA_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2011-06-21 12:12:40 +00:00
|
|
|
@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/xpcshell
|
2010-03-24 17:51:17 +00:00
|
|
|
@(cd $(topsrcdir)/build/mobile && tar $(TAR_CREATE_FLAGS) - $(MOBILE_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-03-21 15:20:00 +00:00
|
|
|
@(cd $(DEPTH)/_tests/xpcshell/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/xpcshell/tests && tar -xf -)
|
|
|
|
@(cd $(DIST)/bin/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
|