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@
|
2012-08-04 11:26:44 -07:00
|
|
|
relativesrcdir = @relativesrcdir@
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2010-09-30 17:10:19 -07:00
|
|
|
NO_JS_MANIFEST = 1
|
|
|
|
MOZ_CHROME_FILE_FORMAT = jar
|
|
|
|
DIST_FILES = install.rdf
|
|
|
|
|
|
|
|
# Used in install.rdf
|
|
|
|
USE_EXTENSION_MANIFEST = 1
|
|
|
|
|
|
|
|
XPI_NAME = mochijar
|
|
|
|
|
|
|
|
# we turn this off for UNIVERSAL_BINARY
|
|
|
|
CHROME_JAR = 1
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2011-11-05 11:35:59 -07:00
|
|
|
# We're installing to _tests/testing/mochitest, so this is the depth
|
2009-02-12 05:49:53 -08:00
|
|
|
# necessary for relative objdir paths.
|
2011-11-05 11:35:59 -07:00
|
|
|
TARGET_DEPTH = ../../..
|
2009-02-12 05:49:53 -08:00
|
|
|
include $(topsrcdir)/build/automation-build.mk
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-11-05 11:35:59 -07:00
|
|
|
# files that get copied into $objdir/_tests/
|
2008-01-28 19:48:34 -08:00
|
|
|
_SERV_FILES = \
|
|
|
|
runtests.py \
|
2008-02-21 13:08:39 -08:00
|
|
|
automation.py \
|
2012-04-27 11:44:59 -07:00
|
|
|
runtestsb2g.py \
|
2010-02-25 11:10:39 -08:00
|
|
|
runtestsremote.py \
|
2010-05-17 11:00:13 -07:00
|
|
|
runtestsvmware.py \
|
2013-07-26 11:40:04 -07:00
|
|
|
mochitest_options.py \
|
2012-12-05 11:28:00 -08:00
|
|
|
manifest.webapp \
|
2012-09-07 13:00:31 -07:00
|
|
|
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanager.py \
|
|
|
|
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py \
|
|
|
|
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py \
|
2013-06-07 12:30:11 -07:00
|
|
|
$(topsrcdir)/testing/mozbase/manifestdestiny/manifestparser/manifestparser.py \
|
2013-05-03 10:37:51 -07:00
|
|
|
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \
|
2012-10-12 10:24:35 -07:00
|
|
|
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \
|
2010-01-11 15:55:51 -08:00
|
|
|
$(topsrcdir)/build/automationutils.py \
|
2010-06-24 02:32:01 -07:00
|
|
|
$(topsrcdir)/build/mobile/remoteautomation.py \
|
2012-04-27 11:44:59 -07:00
|
|
|
$(topsrcdir)/build/mobile/b2gautomation.py \
|
2007-03-22 10:30:00 -07:00
|
|
|
gen_template.pl \
|
|
|
|
server.js \
|
2013-06-16 08:19:47 -07:00
|
|
|
chunkifyTests.js \
|
2013-08-02 05:48:06 -07:00
|
|
|
manifestLibrary.js \
|
2007-03-22 10:30:00 -07:00
|
|
|
harness.xul \
|
2007-07-09 09:24:15 -07:00
|
|
|
browser-test-overlay.xul \
|
|
|
|
browser-test.js \
|
2012-08-03 03:36:59 -07:00
|
|
|
cc-analyzer.js \
|
2010-08-24 10:29:34 -07:00
|
|
|
chrome-harness.js \
|
2007-07-09 09:24:15 -07:00
|
|
|
browser-harness.xul \
|
2007-03-22 10:30:00 -07:00
|
|
|
redirect.html \
|
2008-06-06 23:43:15 -07:00
|
|
|
$(topsrcdir)/build/pgo/server-locations.txt \
|
2007-03-22 10:30:00 -07:00
|
|
|
$(topsrcdir)/netwerk/test/httpserver/httpd.js \
|
2011-05-09 14:54:35 -07:00
|
|
|
pywebsocket_wrapper.py \
|
2011-10-17 13:58:57 -07:00
|
|
|
android.json \
|
2013-05-24 07:39:24 -07:00
|
|
|
androidx86.json \
|
2012-10-19 17:19:22 -07:00
|
|
|
b2g.json \
|
2013-07-26 11:40:04 -07:00
|
|
|
b2g_start_script.js \
|
2013-04-25 13:40:26 -07:00
|
|
|
root-ev-tester.crl \
|
|
|
|
intermediate-ev-tester.crl \
|
2007-03-22 10:30:00 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2011-12-31 07:03:36 -08:00
|
|
|
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
2013-03-01 00:32:03 -08:00
|
|
|
_SERV_FILES += \
|
|
|
|
$(topsrcdir)/mobile/android/base/tests/robocop.ini \
|
|
|
|
$(topsrcdir)/mobile/android/base/tests/robocop_autophone.ini \
|
|
|
|
$(NULL)
|
2011-12-31 07:03:36 -08:00
|
|
|
endif
|
|
|
|
|
2010-06-16 22:38:55 -07:00
|
|
|
_PYWEBSOCKET_FILES = \
|
|
|
|
pywebsocket/standalone.py \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
_MOD_PYWEBSOCKET_FILES = \
|
|
|
|
pywebsocket/mod_pywebsocket/__init__.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/common.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
pywebsocket/mod_pywebsocket/dispatch.py \
|
2011-12-15 15:21:55 -08:00
|
|
|
pywebsocket/mod_pywebsocket/extensions.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/headerparserhandler.py \
|
2011-06-10 13:52:29 -07:00
|
|
|
pywebsocket/mod_pywebsocket/http_header_util.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/memorizingfile.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
pywebsocket/mod_pywebsocket/util.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/stream.py \
|
|
|
|
pywebsocket/mod_pywebsocket/_stream_hixie75.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
pywebsocket/mod_pywebsocket/msgutil.py \
|
2011-12-15 15:21:55 -08:00
|
|
|
pywebsocket/mod_pywebsocket/_stream_hybi.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/_stream_base.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
_HANDSHAKE_FILES = \
|
|
|
|
pywebsocket/mod_pywebsocket/handshake/__init__.py \
|
2011-05-21 18:27:52 -07:00
|
|
|
pywebsocket/mod_pywebsocket/handshake/hybi00.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
pywebsocket/mod_pywebsocket/handshake/_base.py \
|
|
|
|
pywebsocket/mod_pywebsocket/handshake/draft75.py \
|
2011-12-15 15:21:55 -08:00
|
|
|
pywebsocket/mod_pywebsocket/handshake/hybi.py \
|
2010-06-16 22:38:55 -07:00
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-11-05 11:35:59 -07:00
|
|
|
_DEST_DIR = $(DEPTH)/_tests/$(relativesrcdir)
|
2009-01-12 09:15:12 -08:00
|
|
|
|
2010-09-30 17:10:19 -07:00
|
|
|
libs::
|
|
|
|
(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - mochijar) | (cd $(_DEST_DIR) && tar -xf -)
|
|
|
|
|
2010-06-16 22:38:55 -07:00
|
|
|
libs:: $(_PYWEBSOCKET_FILES)
|
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket
|
|
|
|
|
|
|
|
libs:: $(_MOD_PYWEBSOCKET_FILES)
|
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket/mod_pywebsocket
|
|
|
|
|
|
|
|
libs:: $(_HANDSHAKE_FILES)
|
|
|
|
$(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket/mod_pywebsocket/handshake
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
libs:: $(_SERV_FILES)
|
|
|
|
$(INSTALL) $^ $(_DEST_DIR)
|
2009-02-02 05:53:24 -08:00
|
|
|
|
2010-06-25 14:47:19 -07:00
|
|
|
# Binaries and scripts that don't get packaged with the build,
|
2009-02-02 05:53:24 -08:00
|
|
|
# but that we need for the test harness
|
|
|
|
TEST_HARNESS_BINS := \
|
|
|
|
xpcshell$(BIN_SUFFIX) \
|
|
|
|
ssltunnel$(BIN_SUFFIX) \
|
|
|
|
certutil$(BIN_SUFFIX) \
|
|
|
|
pk12util$(BIN_SUFFIX) \
|
2013-06-20 11:41:41 -07:00
|
|
|
OCSPStaplingServer$(BIN_SUFFIX) \
|
2010-06-25 14:47:19 -07:00
|
|
|
fix_stack_using_bpsyms.py \
|
2009-02-02 05:53:24 -08:00
|
|
|
$(NULL)
|
|
|
|
|
2009-10-16 10:34:27 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
TEST_HARNESS_BINS += \
|
|
|
|
crashinject$(BIN_SUFFIX) \
|
|
|
|
crashinjectdll$(DLL_SUFFIX) \
|
2010-03-15 14:44:29 -07:00
|
|
|
vmwarerecordinghelper$(DLL_SUFFIX) \
|
2009-10-16 10:34:27 -07:00
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
2009-08-10 15:52:29 -07:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2010-02-21 13:03:20 -08:00
|
|
|
TEST_HARNESS_BINS += fix_macosx_stack.py
|
2009-08-10 15:52:29 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
TEST_HARNESS_BINS += fix-linux-stack.pl
|
|
|
|
endif
|
|
|
|
|
2010-08-22 18:27:26 -07:00
|
|
|
ifeq (gtk2_1,$(MOZ_WIDGET_TOOLKIT)_$(MOZ_X11))
|
|
|
|
TEST_HARNESS_BINS += screentopng
|
|
|
|
endif
|
|
|
|
|
2012-02-08 12:30:07 -08:00
|
|
|
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
TEST_HARNESS_BINS += screenshot$(BIN_SUFFIX)
|
2013-03-25 16:04:16 -07:00
|
|
|
ifdef MOZ_METRO
|
|
|
|
TEST_HARNESS_BINS += metrotestharness$(BIN_SUFFIX)
|
|
|
|
endif
|
2012-02-08 12:30:07 -08:00
|
|
|
endif
|
|
|
|
|
2009-02-02 05:53:24 -08:00
|
|
|
# Components / typelibs that don't get packaged with
|
|
|
|
# the build, but that we need for the test harness.
|
|
|
|
TEST_HARNESS_COMPONENTS := \
|
|
|
|
test_necko.xpt \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# We need the test plugin as some tests rely on it
|
|
|
|
ifeq (Darwin,$(OS_TARGET))
|
|
|
|
TEST_HARNESS_PLUGINS := \
|
2012-08-13 10:40:15 -07:00
|
|
|
Test.plugin/ \
|
|
|
|
SecondTest.plugin/
|
2009-02-02 05:53:24 -08:00
|
|
|
else
|
|
|
|
TEST_HARNESS_PLUGINS := \
|
2012-08-13 10:40:15 -07:00
|
|
|
$(DLL_PREFIX)nptest$(DLL_SUFFIX) \
|
|
|
|
$(DLL_PREFIX)npsecondtest$(DLL_SUFFIX)
|
2009-02-02 05:53:24 -08:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Rules for staging the necessary harness bits for a test package
|
|
|
|
PKG_STAGE = $(DIST)/test-package-stage
|
2009-12-18 13:56:09 -08:00
|
|
|
DIST_BIN = $(DIST)/bin
|
2009-02-02 05:53:24 -08:00
|
|
|
|
2010-09-30 17:10:19 -07:00
|
|
|
PKG_CHROMEJAR = $(PKG_STAGE)/mochitest/content/
|
|
|
|
|
|
|
|
ifdef CHROME_JAR
|
|
|
|
stage-chromejar:
|
|
|
|
$(NSINSTALL) -D $(PKG_CHROMEJAR)
|
2011-11-05 11:35:59 -07:00
|
|
|
cp -RL $(DEPTH)/_tests/testing/mochitest/browser $(PKG_CHROMEJAR)
|
|
|
|
cp -RL $(DEPTH)/_tests/testing/mochitest/chrome $(PKG_CHROMEJAR)
|
2013-03-26 15:01:15 -07:00
|
|
|
ifdef MOZ_METRO
|
|
|
|
cp -RL $(DEPTH)/_tests/testing/mochitest/metro $(PKG_CHROMEJAR)
|
|
|
|
endif
|
2010-09-30 17:10:19 -07:00
|
|
|
ifdef ACCESSIBILITY
|
2011-11-05 11:35:59 -07:00
|
|
|
cp -RL $(DEPTH)/_tests/testing/mochitest/a11y $(PKG_CHROMEJAR)
|
2010-09-30 17:10:19 -07:00
|
|
|
endif
|
2012-05-23 07:51:21 -07:00
|
|
|
(cd $(PKG_STAGE)/mochitest && zip -rq tests.jar content/)
|
2010-09-30 17:10:19 -07:00
|
|
|
@(rm -rf $(PKG_CHROMEJAR))
|
|
|
|
|
|
|
|
stage-package: stage-chromejar
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(_DEST_DIR):
|
|
|
|
$(NSINSTALL) -D $@
|
|
|
|
|
2009-02-02 05:53:24 -08:00
|
|
|
stage-package:
|
2012-12-17 10:08:00 -08:00
|
|
|
$(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins && $(NSINSTALL) -D $(DIST)/plugins
|
2013-08-02 05:48:06 -07:00
|
|
|
cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
|
2013-07-10 02:55:01 -07:00
|
|
|
(cd $(DEPTH)/_tests/testing/mochitest/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/mochitest && tar -xf -)
|
2013-07-26 11:40:04 -07:00
|
|
|
@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
|
2009-12-18 13:56:09 -08:00
|
|
|
@(cd $(DIST_BIN) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_BINS)) | (cd $(PKG_STAGE)/bin && tar -xf -)
|
|
|
|
@(cd $(DIST_BIN)/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
|
2013-07-10 02:55:01 -07:00
|
|
|
(cd $(topsrcdir)/build/pgo/certs && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/certs && tar -xf -)
|
2012-12-17 10:08:00 -08:00
|
|
|
@(cd $(DIST)/plugins && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_PLUGINS)) | (cd $(PKG_STAGE)/bin/plugins && tar -xf -)
|