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
|
|
|
|
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
|
|
|
|
|
2013-12-02 13:34:21 -08:00
|
|
|
_DEST_DIR = $(DEPTH)/_tests/$(relativesrcdir)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-12-02 13:34:21 -08:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
# We're installing to _tests/testing/mochitest, so this is the depth
|
|
|
|
# necessary for relative objdir paths.
|
|
|
|
TARGET_DEPTH = ../../..
|
|
|
|
include $(topsrcdir)/build/automation-build.mk
|
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-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) \
|
2014-02-13 14:53:29 -08:00
|
|
|
BadCertServer$(BIN_SUFFIX) \
|
2014-08-07 13:32:00 -07:00
|
|
|
ClientAuthServer$(BIN_SUFFIX) \
|
2013-06-20 11:41:41 -07:00
|
|
|
OCSPStaplingServer$(BIN_SUFFIX) \
|
2013-10-29 14:02:35 -07:00
|
|
|
GenerateOCSPResponse$(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)
|
2014-09-03 09:24:38 -07:00
|
|
|
TEST_HARNESS_BINS += fix_linux_stack.py
|
2009-08-10 15:52:29 -07:00
|
|
|
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
|
|
|
|
|
2014-09-28 20:50:52 -07:00
|
|
|
ifdef MOZ_DMD
|
2014-10-09 19:28:33 -07:00
|
|
|
TEST_HARNESS_BINS += \
|
|
|
|
dmd.py \
|
|
|
|
SmokeDMD$(BIN_SUFFIX) \
|
|
|
|
$(NULL)
|
2014-09-28 20:50:52 -07: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/ \
|
2013-04-01 13:04:48 -07:00
|
|
|
SecondTest.plugin/ \
|
|
|
|
JavaTest.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) \
|
2013-04-01 13:04:48 -07:00
|
|
|
$(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) \
|
|
|
|
$(DLL_PREFIX)nptestjava$(DLL_SUFFIX)
|
2009-02-02 05:53:24 -08:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Rules for staging the necessary harness bits for a test package
|
2014-05-15 19:55:00 -07:00
|
|
|
PKG_STAGE = $(DIST)/test-stage
|
2009-12-18 13:56:09 -08:00
|
|
|
DIST_BIN = $(DIST)/bin
|
2009-02-02 05:53:24 -08:00
|
|
|
|
2014-09-23 15:04:49 -07:00
|
|
|
GMP_TEST_PLUGIN_DIRS := \
|
|
|
|
$(DIST_BIN)/gmp-fake \
|
|
|
|
$(DIST_BIN)/gmp-clearkey \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-09-30 17:10:19 -07:00
|
|
|
$(_DEST_DIR):
|
|
|
|
$(NSINSTALL) -D $@
|
|
|
|
|
2014-09-19 13:52:57 -07:00
|
|
|
# On Android only, include a release signed Robocop APK in the test package.
|
|
|
|
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
|
|
|
JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
|
|
|
|
include $(topsrcdir)/config/android-common.mk
|
|
|
|
|
|
|
|
stage-package-android:
|
|
|
|
$(NSINSTALL) -D $(_DEST_DIR)
|
|
|
|
$(call RELEASE_SIGN_ANDROID_APK,\
|
|
|
|
$(DEPTH)/build/mobile/robocop/robocop-debug-unsigned-unaligned.apk,\
|
|
|
|
$(_DEST_DIR)/robocop.apk)
|
|
|
|
|
|
|
|
stage-package: stage-package-android
|
|
|
|
endif
|
|
|
|
|
2009-02-02 05:53:24 -08:00
|
|
|
stage-package:
|
2014-09-23 15:04:49 -07: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
|
2014-02-12 20:27:17 -08:00
|
|
|
(cd $(DEPTH)/_tests/testing && tar $(TAR_CREATE_FLAGS) - mochitest) | (cd $(PKG_STAGE) && 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 -)
|
2014-02-12 20:27:17 -08:00
|
|
|
(cd $(topsrcdir)/build/pgo && tar $(TAR_CREATE_FLAGS) - certs) | (cd $(PKG_STAGE) && 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 -)
|
2014-09-23 15:04:49 -07:00
|
|
|
$(foreach x,$(GMP_TEST_PLUGIN_DIRS),cp -RL $(x) $(PKG_STAGE)/bin/plugins;)
|