2013-02-20 04:18:59 +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/.
|
|
|
|
|
2014-09-22 22:08:06 +04:00
|
|
|
TESTADDONS = source/test/addons
|
|
|
|
ADDONSRC = $(srcdir)/$(TESTADDONS)
|
|
|
|
TESTROOT = $(CURDIR)/$(DEPTH)/_tests/testing/mochitest/jetpack-addon/$(relativesrcdir)/$(TESTADDONS)
|
|
|
|
|
|
|
|
# Build a list of the test add-ons
|
|
|
|
ADDONS = $(patsubst $(ADDONSRC)/%/package.json,$(TESTADDONS)/%.xpi,$(wildcard $(ADDONSRC)/*/package.json))
|
|
|
|
|
|
|
|
INSTALL_TARGETS += test_addons
|
|
|
|
test_addons_FILES = $(ADDONS)
|
|
|
|
test_addons_DEST = $(TESTROOT)
|
|
|
|
|
|
|
|
sinclude $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
# This can switch to just zipping the files when native jetpacks land
|
|
|
|
$(TESTADDONS)/%.xpi: FORCE $(call mkdir_deps,$(CURDIR)/$(TESTADDONS)) $(ADDONSRC)/%
|
|
|
|
$(PYTHON) $(srcdir)/source/bin/cfx xpi --pkgdir=$(lastword $^) --output-file=$@
|
|
|
|
|
|
|
|
#libs:: $(ADDONS)
|
|
|
|
|
2013-02-20 04:18:59 +04:00
|
|
|
TEST_FILES = \
|
2014-09-22 22:08:06 +04:00
|
|
|
$(srcdir)/source/app-extension \
|
|
|
|
$(srcdir)/source/bin \
|
|
|
|
$(srcdir)/source/python-lib \
|
|
|
|
$(srcdir)/source/test \
|
|
|
|
$(srcdir)/source/package.json \
|
|
|
|
$(srcdir)/source/mapping.json \
|
2013-02-20 04:18:59 +04:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# Remove this once the test harness uses the APIs built into Firefox
|
2014-09-22 22:08:06 +04:00
|
|
|
TEST_FILES += $(srcdir)/source/lib
|
2013-02-20 04:18:59 +04:00
|
|
|
|
2014-05-16 06:55:00 +04:00
|
|
|
PKG_STAGE = $(DIST)/test-stage
|
2013-02-20 04:18:59 +04:00
|
|
|
|
|
|
|
stage-tests-package:: $(TEST_FILES)
|
|
|
|
$(INSTALL) $^ $(PKG_STAGE)/jetpack
|