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
|
||||
except BuildEnvironmentNotFoundException:
|
||||
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
|
||||
|
||||
reader = BuildReader(config)
|
||||
|
11
moz.build
11
moz.build
@ -26,6 +26,11 @@ DIRS += [
|
||||
]
|
||||
|
||||
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 += [
|
||||
'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.
|
||||
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']
|
||||
|
||||
include('build/templates.mozbuild')
|
||||
|
@ -113,11 +113,7 @@ class EmptyConfig(object):
|
||||
def get(self, key, default=None):
|
||||
return self[key]
|
||||
|
||||
def __init__(self, topsrcdir):
|
||||
self.topsrcdir = topsrcdir
|
||||
self.topobjdir = ''
|
||||
|
||||
self.substs = self.PopulateOnGetDict(EmptyValue, {
|
||||
default_substs = {
|
||||
# These 2 variables are used semi-frequently and it isn't worth
|
||||
# changing all the instances.
|
||||
b'MOZ_APP_NAME': b'empty',
|
||||
@ -127,7 +123,13 @@ class EmptyConfig(object):
|
||||
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.topobjdir = ''
|
||||
|
||||
self.substs = self.PopulateOnGetDict(EmptyValue, substs or self.default_substs)
|
||||
udict = {}
|
||||
for k, v in self.substs.items():
|
||||
if isinstance(v, str):
|
||||
|
Loading…
Reference in New Issue
Block a user