mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1345109 - Delete 'JS_STANDALONE' from EmptyConfig when generating test metadata, r=mshal
EmptyConfig objects set JS_STANDALONE=1 by default. However, test tasks that need to run without an objdir need to be behind an "if not CONFIG['JS_STANDALONE']" condition to avoid causing bustage to sm-pkg task (js packaging). This patch explicitly deletes that default value, only when generating the TestManifestBackend. Ideally, the js/src packaging should have their own moz.build instead of re-using the root moz.build. But this is an easier fix in the short term to get the marionette-harness tests working again. MozReview-Commit-ID: 26lHLY6WlZK --HG-- extra : rebase_source : 9c2ffdd938f2f2d6ead7d2aead610a7028e18d97
This commit is contained in:
parent
a9859900b2
commit
430f043d9e
@ -16,7 +16,14 @@ def gen_test_backend():
|
|||||||
config = build_obj.config_environment
|
config = build_obj.config_environment
|
||||||
except BuildEnvironmentNotFoundException:
|
except BuildEnvironmentNotFoundException:
|
||||||
print("No build detected, test metadata may be incomplete.")
|
print("No build detected, test metadata may be incomplete.")
|
||||||
config = EmptyConfig(build_obj.topsrcdir)
|
|
||||||
|
# If 'JS_STANDALONE' is set, tests that don't require an objdir won't
|
||||||
|
# be picked up due to bug 1345209.
|
||||||
|
substs = EmptyConfig.default_substs
|
||||||
|
if 'JS_STANDALONE' in substs:
|
||||||
|
del substs['JS_STANDALONE']
|
||||||
|
|
||||||
|
config = EmptyConfig(build_obj.topsrcdir, substs)
|
||||||
config.topobjdir = build_obj.topobjdir
|
config.topobjdir = build_obj.topobjdir
|
||||||
|
|
||||||
reader = BuildReader(config)
|
reader = BuildReader(config)
|
||||||
|
11
moz.build
11
moz.build
@ -26,6 +26,11 @@ DIRS += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if not CONFIG['JS_STANDALONE']:
|
if not CONFIG['JS_STANDALONE']:
|
||||||
|
# These python manifests are included here so they get picked up without an objdir
|
||||||
|
PYTHON_UNITTEST_MANIFESTS += [
|
||||||
|
'testing/marionette/harness/marionette_harness/tests/harness_unit/python.ini',
|
||||||
|
]
|
||||||
|
|
||||||
CONFIGURE_SUBST_FILES += [
|
CONFIGURE_SUBST_FILES += [
|
||||||
'tools/update-packaging/Makefile',
|
'tools/update-packaging/Makefile',
|
||||||
]
|
]
|
||||||
@ -85,12 +90,6 @@ if not CONFIG['JS_STANDALONE'] and CONFIG['MOZ_BUILD_APP']:
|
|||||||
# Bring in the configuration for the configured application.
|
# Bring in the configuration for the configured application.
|
||||||
include('/' + CONFIG['MOZ_BUILD_APP'] + '/app.mozbuild')
|
include('/' + CONFIG['MOZ_BUILD_APP'] + '/app.mozbuild')
|
||||||
|
|
||||||
if not CONFIG['JS_STANDALONE']:
|
|
||||||
# These python manifests are included here so they get picked up without an objdir
|
|
||||||
PYTHON_UNITTEST_MANIFESTS += [
|
|
||||||
'testing/marionette/harness/marionette_harness/tests/harness_unit/python.ini',
|
|
||||||
]
|
|
||||||
|
|
||||||
CONFIGURE_SUBST_FILES += ['.cargo/config']
|
CONFIGURE_SUBST_FILES += ['.cargo/config']
|
||||||
|
|
||||||
include('build/templates.mozbuild')
|
include('build/templates.mozbuild')
|
||||||
|
@ -113,21 +113,23 @@ class EmptyConfig(object):
|
|||||||
def get(self, key, default=None):
|
def get(self, key, default=None):
|
||||||
return self[key]
|
return self[key]
|
||||||
|
|
||||||
def __init__(self, topsrcdir):
|
default_substs = {
|
||||||
|
# These 2 variables are used semi-frequently and it isn't worth
|
||||||
|
# changing all the instances.
|
||||||
|
b'MOZ_APP_NAME': b'empty',
|
||||||
|
b'MOZ_CHILD_PROCESS_NAME': b'empty',
|
||||||
|
# Set manipulations are performed within the moz.build files. But
|
||||||
|
# set() is not an exposed symbol, so we can't create an empty set.
|
||||||
|
b'NECKO_PROTOCOLS': set(),
|
||||||
|
# Needed to prevent js/src's config.status from loading.
|
||||||
|
b'JS_STANDALONE': b'1',
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(self, topsrcdir, substs=None):
|
||||||
self.topsrcdir = topsrcdir
|
self.topsrcdir = topsrcdir
|
||||||
self.topobjdir = ''
|
self.topobjdir = ''
|
||||||
|
|
||||||
self.substs = self.PopulateOnGetDict(EmptyValue, {
|
self.substs = self.PopulateOnGetDict(EmptyValue, substs or self.default_substs)
|
||||||
# These 2 variables are used semi-frequently and it isn't worth
|
|
||||||
# changing all the instances.
|
|
||||||
b'MOZ_APP_NAME': b'empty',
|
|
||||||
b'MOZ_CHILD_PROCESS_NAME': b'empty',
|
|
||||||
# Set manipulations are performed within the moz.build files. But
|
|
||||||
# set() is not an exposed symbol, so we can't create an empty set.
|
|
||||||
b'NECKO_PROTOCOLS': set(),
|
|
||||||
# Needed to prevent js/src's config.status from loading.
|
|
||||||
b'JS_STANDALONE': b'1',
|
|
||||||
})
|
|
||||||
udict = {}
|
udict = {}
|
||||||
for k, v in self.substs.items():
|
for k, v in self.substs.items():
|
||||||
if isinstance(v, str):
|
if isinstance(v, str):
|
||||||
|
Loading…
Reference in New Issue
Block a user