зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1528860 - Synchronize artifact command --job options with artifacts.JOB_DETAILS. r=ted
Differential Revision: https://phabricator.services.mozilla.com/D20227
This commit is contained in:
Родитель
079a4d2441
Коммит
41d0022e0c
|
@ -1194,22 +1194,41 @@ class MachDebug(MachCommandBase):
|
|||
return json.JSONEncoder.default(self, obj)
|
||||
json.dump(self, cls=EnvironmentEncoder, sort_keys=True, fp=out)
|
||||
|
||||
|
||||
JOB_CHOICES = {
|
||||
'android-api-16-opt',
|
||||
'android-api-16-debug',
|
||||
'android-x86-opt',
|
||||
'android-x86_64-opt',
|
||||
'android-x86_64-debug',
|
||||
'android-aarch64-opt',
|
||||
'android-aarch64-debug',
|
||||
'linux-opt',
|
||||
'linux-pgo',
|
||||
'linux-debug',
|
||||
'linux64-opt',
|
||||
'linux64-pgo',
|
||||
'linux64-debug',
|
||||
'macosx64-opt',
|
||||
'macosx64-debug',
|
||||
'win32-opt',
|
||||
'win32-pgo',
|
||||
'win32-debug',
|
||||
'win64-opt',
|
||||
'win64-pgo',
|
||||
'win64-debug',
|
||||
'win64-aarch64-opt',
|
||||
'win64-aarch64-debug',
|
||||
}
|
||||
|
||||
|
||||
class ArtifactSubCommand(SubCommand):
|
||||
def __call__(self, func):
|
||||
after = SubCommand.__call__(self, func)
|
||||
jobchoices = {
|
||||
'android-api-16',
|
||||
'android-x86',
|
||||
'linux',
|
||||
'linux64',
|
||||
'macosx64',
|
||||
'win32',
|
||||
'win64'
|
||||
}
|
||||
args = [
|
||||
CommandArgument('--tree', metavar='TREE', type=str,
|
||||
help='Firefox tree.'),
|
||||
CommandArgument('--job', metavar='JOB', choices=jobchoices,
|
||||
CommandArgument('--job', metavar='JOB', choices=JOB_CHOICES,
|
||||
help='Build job.'),
|
||||
CommandArgument('--verbose', '-v', action='store_true',
|
||||
help='Print verbose output.'),
|
||||
|
@ -1251,7 +1270,12 @@ class PackageFrontend(MachCommandBase):
|
|||
if conditions.is_git(self):
|
||||
git = self.substs['GIT']
|
||||
|
||||
from mozbuild.artifacts import Artifacts
|
||||
from mozbuild.artifacts import (Artifacts, JOB_DETAILS)
|
||||
# We can't derive JOB_CHOICES from JOB_DETAILS because we don't want to
|
||||
# import the artifacts module globally ; and this module can't be
|
||||
# imported in unit tests, so do the check here.
|
||||
assert set(JOB_DETAILS.keys()) == JOB_CHOICES
|
||||
|
||||
artifacts = Artifacts(tree, self.substs, self.defines, job,
|
||||
log=self.log, cache_dir=cache_dir,
|
||||
skip_cache=skip_cache, hg=hg, git=git,
|
||||
|
|
Загрузка…
Ссылка в новой задаче