2007-01-17 23:38:57 +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/.
|
2007-01-17 23:38:57 +03:00
|
|
|
|
2010-10-01 04:10:19 +04:00
|
|
|
|
2013-12-03 01:34:21 +04:00
|
|
|
_DEST_DIR = $(DEPTH)/_tests/$(relativesrcdir)
|
2007-01-26 21:44:58 +03:00
|
|
|
|
2013-12-03 01:34:21 +04: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 20:15:12 +03:00
|
|
|
|
2010-10-01 04:10:19 +04:00
|
|
|
libs::
|
|
|
|
(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - mochijar) | (cd $(_DEST_DIR) && tar -xf -)
|
|
|
|
|
2010-06-26 01:47:19 +04:00
|
|
|
# Binaries and scripts that don't get packaged with the build,
|
2009-02-02 16:53:24 +03:00
|
|
|
# but that we need for the test harness
|
|
|
|
TEST_HARNESS_BINS := \
|
|
|
|
xpcshell$(BIN_SUFFIX) \
|
|
|
|
ssltunnel$(BIN_SUFFIX) \
|
2015-10-22 02:37:42 +03:00
|
|
|
fileid$(BIN_SUFFIX) \
|
2009-02-02 16:53:24 +03:00
|
|
|
certutil$(BIN_SUFFIX) \
|
|
|
|
pk12util$(BIN_SUFFIX) \
|
2014-02-14 02:53:29 +04:00
|
|
|
BadCertServer$(BIN_SUFFIX) \
|
2013-06-20 22:41:41 +04:00
|
|
|
OCSPStaplingServer$(BIN_SUFFIX) \
|
2013-10-30 01:02:35 +04:00
|
|
|
GenerateOCSPResponse$(BIN_SUFFIX) \
|
2010-06-26 01:47:19 +04:00
|
|
|
fix_stack_using_bpsyms.py \
|
2009-02-02 16:53:24 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2009-10-16 21:34:27 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
TEST_HARNESS_BINS += \
|
|
|
|
crashinject$(BIN_SUFFIX) \
|
|
|
|
crashinjectdll$(DLL_SUFFIX) \
|
2015-08-19 03:04:45 +03:00
|
|
|
minidumpwriter$(BIN_SUFFIX) \
|
2009-10-16 21:34:27 +04:00
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
2016-01-27 17:39:53 +03:00
|
|
|
# The fileid utility depends on mozglue. See bug 1069556.
|
2009-08-11 02:52:29 +04:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2016-01-27 17:39:53 +03:00
|
|
|
TEST_HARNESS_BINS += \
|
|
|
|
fix_macosx_stack.py \
|
|
|
|
$(DLL_PREFIX)mozglue$(DLL_SUFFIX)
|
2009-08-11 02:52:29 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
2014-09-03 20:24:38 +04:00
|
|
|
TEST_HARNESS_BINS += fix_linux_stack.py
|
2009-08-11 02:52:29 +04:00
|
|
|
endif
|
|
|
|
|
2015-07-31 00:52:13 +03:00
|
|
|
ifdef MOZ_X11
|
|
|
|
ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
|
2010-08-23 05:27:26 +04:00
|
|
|
TEST_HARNESS_BINS += screentopng
|
|
|
|
endif
|
2015-07-31 00:52:13 +03:00
|
|
|
endif
|
2010-08-23 05:27:26 +04:00
|
|
|
|
2012-02-09 00:30:07 +04:00
|
|
|
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
TEST_HARNESS_BINS += screenshot$(BIN_SUFFIX)
|
|
|
|
endif
|
|
|
|
|
2014-09-29 07:50:52 +04:00
|
|
|
ifdef MOZ_DMD
|
2014-10-10 06:28:33 +04:00
|
|
|
TEST_HARNESS_BINS += \
|
|
|
|
dmd.py \
|
|
|
|
SmokeDMD$(BIN_SUFFIX) \
|
|
|
|
$(NULL)
|
2014-09-29 07:50:52 +04:00
|
|
|
endif
|
|
|
|
|
2009-02-02 16:53:24 +03: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 21:40:15 +04:00
|
|
|
Test.plugin/ \
|
2013-04-02 00:04:48 +04:00
|
|
|
SecondTest.plugin/ \
|
2015-07-10 22:12:35 +03:00
|
|
|
ThirdTest.plugin/ \
|
|
|
|
npswftest.plugin/ \
|
2015-11-19 01:53:27 +03:00
|
|
|
npctrltest.plugin/ \
|
2013-04-02 00:04:48 +04:00
|
|
|
JavaTest.plugin/
|
2009-02-02 16:53:24 +03:00
|
|
|
else
|
|
|
|
TEST_HARNESS_PLUGINS := \
|
2012-08-13 21:40:15 +04:00
|
|
|
$(DLL_PREFIX)nptest$(DLL_SUFFIX) \
|
2013-04-02 00:04:48 +04:00
|
|
|
$(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) \
|
2015-07-10 22:12:35 +03:00
|
|
|
$(DLL_PREFIX)npthirdtest$(DLL_SUFFIX) \
|
|
|
|
$(DLL_PREFIX)nptestjava$(DLL_SUFFIX) \
|
2015-11-19 01:53:27 +03:00
|
|
|
$(DLL_PREFIX)npswftest$(DLL_SUFFIX) \
|
|
|
|
$(DLL_PREFIX)npctrltest$(DLL_SUFFIX)
|
2009-02-02 16:53:24 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Rules for staging the necessary harness bits for a test package
|
2014-05-16 06:55:00 +04:00
|
|
|
PKG_STAGE = $(DIST)/test-stage
|
2009-12-19 00:56:09 +03:00
|
|
|
DIST_BIN = $(DIST)/bin
|
2009-02-02 16:53:24 +03:00
|
|
|
|
2014-09-24 02:04:49 +04:00
|
|
|
GMP_TEST_PLUGIN_DIRS := \
|
|
|
|
$(DIST_BIN)/gmp-fake \
|
2015-04-30 07:52:26 +03:00
|
|
|
$(DIST_BIN)/gmp-fakeopenh264 \
|
2014-09-24 02:04:49 +04:00
|
|
|
$(DIST_BIN)/gmp-clearkey \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-10-01 04:10:19 +04:00
|
|
|
$(_DEST_DIR):
|
|
|
|
$(NSINSTALL) -D $@
|
|
|
|
|
2014-09-20 00:52:57 +04:00
|
|
|
# On Android only, include a release signed Robocop APK in the test package.
|
|
|
|
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
|
|
|
include $(topsrcdir)/config/android-common.mk
|
|
|
|
|
|
|
|
stage-package-android:
|
|
|
|
$(NSINSTALL) -D $(_DEST_DIR)
|
2016-02-12 17:14:36 +03:00
|
|
|
$(call RELEASE_SIGN_ANDROID_APK,\
|
|
|
|
$(DEPTH)/mobile/android/tests/browser/robocop/robocop-debug-unsigned-unaligned.apk,\
|
|
|
|
$(_DEST_DIR)/robocop.apk)
|
2014-09-20 00:52:57 +04:00
|
|
|
|
|
|
|
stage-package: stage-package-android
|
|
|
|
endif
|
|
|
|
|
2009-02-02 16:53:24 +03:00
|
|
|
stage-package:
|
2014-09-24 02:04:49 +04:00
|
|
|
$(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins && $(NSINSTALL) -D $(DIST)/plugins
|
2013-08-02 16:48:06 +04:00
|
|
|
cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
|
2013-07-26 22:40:04 +04:00
|
|
|
@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
|
2009-12-19 00:56:09 +03: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-13 08:27:17 +04:00
|
|
|
(cd $(topsrcdir)/build/pgo && tar $(TAR_CREATE_FLAGS) - certs) | (cd $(PKG_STAGE) && tar -xf -)
|
2012-12-17 22:08:00 +04:00
|
|
|
@(cd $(DIST)/plugins && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_PLUGINS)) | (cd $(PKG_STAGE)/bin/plugins && tar -xf -)
|
2014-09-24 02:04:49 +04:00
|
|
|
$(foreach x,$(GMP_TEST_PLUGIN_DIRS),cp -RL $(x) $(PKG_STAGE)/bin/plugins;)
|