зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338559 - Use the tier system to recurse for 'make check'; r=glandium
This helps us avoid recursing over every directory when we only need to run 'make check' in a select few. MozReview-Commit-ID: BJ3hJBOneIz --HG-- extra : rebase_source : 2493f924b9ccba3c779e512d7a8b7a2c26f43797
This commit is contained in:
Родитель
a5a9ed88a7
Коммит
e86326d270
|
@ -45,7 +45,7 @@ endif # WINNT
|
|||
ifndef INCLUDED_AUTOCONF_MK
|
||||
default::
|
||||
else
|
||||
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
|
||||
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools$(if $(filter check recurse_check,$(MAKECMDGOALS)), check)
|
||||
endif
|
||||
|
||||
# These defines are used to support the twin-topsrcdir model for comm-central.
|
||||
|
|
|
@ -1536,12 +1536,6 @@ documentation:
|
|||
@cd $(DEPTH)
|
||||
$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
check::
|
||||
$(LOOP_OVER_DIRS)
|
||||
endif
|
||||
|
||||
|
||||
FREEZE_VARIABLES = \
|
||||
CSRCS \
|
||||
CPPSRCS \
|
||||
|
|
|
@ -417,6 +417,7 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
'libs': set(),
|
||||
'misc': set(),
|
||||
'tools': set(),
|
||||
'check': set(),
|
||||
}
|
||||
|
||||
def summary(self):
|
||||
|
@ -706,6 +707,7 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
('libs', libs_filter),
|
||||
('misc', parallel_filter),
|
||||
('tools', tools_filter),
|
||||
('check', parallel_filter),
|
||||
]
|
||||
|
||||
root_deps_mk = Makefile()
|
||||
|
@ -848,9 +850,9 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
self._create_makefile(obj, stub=stub)
|
||||
with open(obj.output_path) as fh:
|
||||
content = fh.read()
|
||||
# Skip every directory but those with a Makefile
|
||||
# containing a tools target, or XPI_PKGNAME or
|
||||
# INSTALL_EXTENSION_ID.
|
||||
# Directories with a Makefile containing a tools target, or
|
||||
# XPI_PKGNAME or INSTALL_EXTENSION_ID can't be skipped and
|
||||
# must run during the 'tools' tier.
|
||||
for t in (b'XPI_PKGNAME', b'INSTALL_EXTENSION_ID',
|
||||
b'tools'):
|
||||
if t not in content:
|
||||
|
@ -862,6 +864,12 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
self._no_skip['tools'].add(mozpath.relpath(objdir,
|
||||
self.environment.topobjdir))
|
||||
|
||||
# Directories with a Makefile containing a check target
|
||||
# can't be skipped and must run during the 'check' tier.
|
||||
if re.search('(?:^|\s)check.*::', content, re.M):
|
||||
self._no_skip['check'].add(mozpath.relpath(objdir,
|
||||
self.environment.topobjdir))
|
||||
|
||||
# Detect any Makefile.ins that contain variables on the
|
||||
# moz.build-only list
|
||||
self._check_blacklisted_variables(makefile_in, content)
|
||||
|
|
Загрузка…
Ссылка в новой задаче