mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-29 03:44:37 +00:00
f3842022cf
--HG-- extra : rebase_source : f01a7f0ab55c32256c641dbfa33024132ad0cc79
61 lines
1.9 KiB
Makefile
61 lines
1.9 KiB
Makefile
# -*- makefile -*-
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
#
|
|
# 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/.
|
|
|
|
ifndef INCLUDED_TESTS_MOCHITEST_MK #{
|
|
|
|
ifdef relativesrcdir
|
|
mochitestdir = $(DEPTH)/_tests/testing/mochitest/$1/$(relativesrcdir)
|
|
else
|
|
mochitestdir = $(DEPTH)/_tests/testing/mochitest/$1/$(subst $(topsrcdir),,$(srcdir))
|
|
endif
|
|
|
|
define mochitest-libs-rule-template
|
|
libs:: $$($(1))
|
|
$$(call install_cmd,$$(foreach f,$$^,"$$(f)") $$(call mochitestdir,$(2)))
|
|
endef
|
|
|
|
# Provide support for modules with such a large number of tests that
|
|
# installing them with a single $(INSTALL) invocation would overflow
|
|
# command-line length limits on some operating systems.
|
|
ifdef MOCHITEST_FILES_PARTS
|
|
ifdef MOCHITEST_FILES
|
|
$(error You must define only one of MOCHITEST_FILES_PARTS or MOCHITEST_FILES)
|
|
endif
|
|
$(foreach part,$(MOCHITEST_FILES_PARTS),$(eval $(call mochitest-libs-rule-template,$(part),tests)))
|
|
endif
|
|
|
|
ifdef MOCHITEST_FILES
|
|
$(eval $(call mochitest-libs-rule-template,MOCHITEST_FILES,tests))
|
|
endif
|
|
|
|
ifdef MOCHITEST_CHROME_FILES
|
|
$(eval $(call mochitest-libs-rule-template,MOCHITEST_CHROME_FILES,chrome))
|
|
endif
|
|
|
|
ifdef MOCHITEST_BROWSER_FILES_PARTS
|
|
ifdef MOCHITEST_BROWSER_FILES
|
|
$(error You must define only one of MOCHITEST_BROWSER_FILES_PARTS or MOCHITEST_BROWSER_FILES)
|
|
endif
|
|
$(foreach part,$(MOCHITEST_BROWSER_FILES_PARTS),$(eval $(call mochitest-libs-rule-template,$(part),browser)))
|
|
endif
|
|
|
|
ifdef MOCHITEST_BROWSER_FILES
|
|
$(eval $(call mochitest-libs-rule-template,MOCHITEST_BROWSER_FILES,browser))
|
|
endif
|
|
|
|
ifdef MOCHITEST_A11Y_FILES
|
|
$(eval $(call mochitest-libs-rule-template,MOCHITEST_A11Y_FILES,a11y))
|
|
endif
|
|
|
|
ifdef MOCHITEST_WEBAPPRT_CHROME_FILES
|
|
$(eval $(call mochitest-libs-rule-template,MOCHITEST_WEBAPPRT_CHROME_FILES,webapprtChrome))
|
|
endif
|
|
|
|
INCLUDED_TESTS_MOCHITEST_MK := 1
|
|
|
|
endif #} INCLUDED_TESTS_MOCHITEST_MK
|