2005-11-29 19:24:42 +03:00
|
|
|
#
|
2012-05-21 15:12:37 +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/.
|
2006-01-27 23:56:16 +03:00
|
|
|
|
2012-08-04 22:26:44 +04:00
|
|
|
DEPTH = @DEPTH@
|
2006-01-27 23:56:16 +03:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
2005-11-29 19:24:42 +03:00
|
|
|
|
2009-01-22 21:39:02 +03:00
|
|
|
MODULE = testing_xpcshell
|
2005-11-29 19:24:42 +03:00
|
|
|
|
2006-09-13 20:33:39 +04:00
|
|
|
# Here's how you let the build system know there are tests in the
|
|
|
|
# "example" folder:
|
2012-02-04 21:32:24 +04:00
|
|
|
TEST_DIRS += example
|
2006-09-13 20:33:39 +04:00
|
|
|
|
2006-01-27 23:56:16 +03:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2009-03-21 18:20:00 +03:00
|
|
|
|
|
|
|
# Harness files from the srcdir
|
|
|
|
TEST_HARNESS_FILES := \
|
|
|
|
runxpcshelltests.py \
|
2010-03-13 21:57:06 +03:00
|
|
|
remotexpcshelltests.py \
|
2009-03-21 18:20:00 +03:00
|
|
|
head.js \
|
2012-04-26 04:12:33 +04:00
|
|
|
node-spdy \
|
|
|
|
moz-spdy \
|
2009-03-21 18:20:00 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2009-05-14 15:37:40 +04:00
|
|
|
# Extra files needed from $(topsrcdir)/build
|
|
|
|
EXTRA_BUILD_FILES := \
|
|
|
|
automationutils.py \
|
2011-05-20 19:54:01 +04:00
|
|
|
manifestparser.py \
|
2009-05-14 15:37:40 +04:00
|
|
|
$(NULL)
|
|
|
|
|
2010-03-24 20:51:17 +03:00
|
|
|
# And files for running xpcshell remotely from $(topsrcdir)/build/mobile
|
|
|
|
MOBILE_BUILD_FILES := \
|
|
|
|
devicemanager.py \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-03-21 18:20:00 +03: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 04:44:44 +04:00
|
|
|
httpd.manifest \
|
2009-03-21 18:20:00 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2012-04-25 17:22:04 +04:00
|
|
|
MOZINFO_FILES := \
|
|
|
|
mozinfo.py
|
|
|
|
|
2009-03-21 18:20:00 +03:00
|
|
|
# Rules for staging the necessary harness bits for a test package
|
|
|
|
PKG_STAGE = $(DIST)/test-package-stage
|
|
|
|
|
2011-05-20 19:54:01 +04:00
|
|
|
libs::
|
|
|
|
$(INSTALL) $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell
|
|
|
|
cp $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell/all-test-dirs.list
|
|
|
|
|
2011-06-21 16:12:40 +04:00
|
|
|
# Run selftests
|
|
|
|
check::
|
|
|
|
OBJDIR=$(DEPTH) $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
2012-04-25 17:22:04 +04:00
|
|
|
-I$(topsrcdir)/build -I$(topsrcdir)/testing/mozbase/mozinfo/mozinfo $(srcdir)/selftest.py
|
2011-06-21 16:12:40 +04:00
|
|
|
|
2009-03-21 18:20:00 +03:00
|
|
|
stage-package:
|
|
|
|
$(NSINSTALL) -D $(PKG_STAGE)/xpcshell/tests
|
2012-04-25 17:22:04 +04:00
|
|
|
@(cd $(topsrcdir)/testing/mozbase/mozinfo/mozinfo && tar $(TAR_CREATE_FLAGS) - $(MOZINFO_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-03-21 18:20:00 +03:00
|
|
|
@(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-05-14 15:37:40 +04:00
|
|
|
@(cd $(topsrcdir)/build && tar $(TAR_CREATE_FLAGS) - $(EXTRA_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2011-06-21 16:12:40 +04:00
|
|
|
@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/xpcshell
|
2010-03-24 20:51:17 +03:00
|
|
|
@(cd $(topsrcdir)/build/mobile && tar $(TAR_CREATE_FLAGS) - $(MOBILE_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2012-05-23 18:51:21 +04:00
|
|
|
(cd $(DEPTH)/_tests/xpcshell/ && tar $(TAR_CREATE_FLAGS_QUIET) - *) | (cd $(PKG_STAGE)/xpcshell/tests && tar -xf -)
|
2009-03-21 18:20:00 +03:00
|
|
|
@(cd $(DIST)/bin/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
|