2007-03-22 10:30:00 -07:00
|
|
|
#
|
2012-05-21 04:12:37 -07: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/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2007-03-22 10:30:00 -07:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
2009-03-21 08:20:00 -07:00
|
|
|
|
|
|
|
# Harness files from the srcdir
|
|
|
|
TEST_HARNESS_FILES := \
|
|
|
|
runxpcshelltests.py \
|
2010-03-13 10:57:06 -08:00
|
|
|
remotexpcshelltests.py \
|
2012-10-17 15:12:41 -07:00
|
|
|
runtestsb2g.py \
|
2009-03-21 08:20:00 -07:00
|
|
|
head.js \
|
2012-04-25 17:12:33 -07:00
|
|
|
node-spdy \
|
|
|
|
moz-spdy \
|
2009-03-21 08:20:00 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2009-05-14 04:37:40 -07:00
|
|
|
# Extra files needed from $(topsrcdir)/build
|
|
|
|
EXTRA_BUILD_FILES := \
|
|
|
|
automationutils.py \
|
2011-05-20 08:54:01 -07:00
|
|
|
manifestparser.py \
|
2009-05-14 04:37:40 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2012-10-17 15:12:41 -07:00
|
|
|
MOZDEVICE_FILES := \
|
2010-03-24 10:51:17 -07:00
|
|
|
devicemanager.py \
|
2012-10-17 15:12:41 -07:00
|
|
|
devicemanagerADB.py \
|
|
|
|
devicemanagerSUT.py \
|
2013-04-10 11:51:31 -07:00
|
|
|
Zeroconf.py \
|
2010-03-24 10:51:17 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2009-03-21 08:20:00 -07: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-22 17:44:44 -07:00
|
|
|
httpd.manifest \
|
2009-03-21 08:20:00 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2012-04-25 06:22:04 -07:00
|
|
|
MOZINFO_FILES := \
|
|
|
|
mozinfo.py
|
|
|
|
|
2009-03-21 08:20:00 -07:00
|
|
|
# Rules for staging the necessary harness bits for a test package
|
|
|
|
PKG_STAGE = $(DIST)/test-package-stage
|
|
|
|
|
2011-05-20 08:54:01 -07:00
|
|
|
libs::
|
|
|
|
$(INSTALL) $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell
|
2012-12-03 11:56:12 -08:00
|
|
|
$(INSTALL) $(srcdir)/xpcshell_b2g.ini $(DEPTH)/_tests/xpcshell
|
2012-12-21 11:44:42 -08:00
|
|
|
$(INSTALL) $(srcdir)/xpcshell_android.ini $(DEPTH)/_tests/xpcshell
|
2011-05-20 08:54:01 -07:00
|
|
|
cp $(srcdir)/xpcshell.ini $(DEPTH)/_tests/xpcshell/all-test-dirs.list
|
|
|
|
|
2011-06-21 05:12:40 -07:00
|
|
|
# Run selftests
|
|
|
|
check::
|
|
|
|
OBJDIR=$(DEPTH) $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
2012-12-20 00:43:19 -08:00
|
|
|
-I$(DEPTH)/build -I$(topsrcdir)/build -I$(topsrcdir)/testing/mozbase/mozinfo/mozinfo $(srcdir)/selftest.py
|
2011-06-21 05:12:40 -07:00
|
|
|
|
2009-03-21 08:20:00 -07:00
|
|
|
stage-package:
|
|
|
|
$(NSINSTALL) -D $(PKG_STAGE)/xpcshell/tests
|
2012-04-25 06:22:04 -07:00
|
|
|
@(cd $(topsrcdir)/testing/mozbase/mozinfo/mozinfo && tar $(TAR_CREATE_FLAGS) - $(MOZINFO_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-03-21 08:20:00 -07:00
|
|
|
@(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2009-05-14 04:37:40 -07:00
|
|
|
@(cd $(topsrcdir)/build && tar $(TAR_CREATE_FLAGS) - $(EXTRA_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2011-06-21 05:12:40 -07:00
|
|
|
@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/xpcshell
|
2012-12-20 00:43:19 -08:00
|
|
|
@cp $(DEPTH)/build/automation.py $(PKG_STAGE)/xpcshell
|
2012-10-17 15:12:41 -07:00
|
|
|
@(cd $(topsrcdir)/testing/mozbase/mozdevice/mozdevice && tar $(TAR_CREATE_FLAGS) - $(MOZDEVICE_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -)
|
2012-05-23 07:51:21 -07:00
|
|
|
(cd $(DEPTH)/_tests/xpcshell/ && tar $(TAR_CREATE_FLAGS_QUIET) - *) | (cd $(PKG_STAGE)/xpcshell/tests && tar -xf -)
|
2009-03-21 08:20:00 -07:00
|
|
|
@(cd $(DIST)/bin/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
|