Bug 1085620 part5: Support emulator builds in trygraph. r=lightsofapollo

Emulator tasks have some additional parameters not found in other
tasks. Therefore, builds can have an 'additional-parameters' field in
which specific task template replacements can be passed to trygraph.
This field is optional.

Moreover, the syntax for job_flags.yml builds was changed a bit.
Now, instead of:

builds:
  <platform>:
    types:
      opt: <task>
      debug: <task>

The syntax is:

builds:
  <platform>:
    types:
      opt:
        task: <task>
        additional-parameters:
          <parameter 1>: <value>
          <parameter 2>: <value>
          ...
      debug:
        task: <task>
        additional-parameters:
          <parameter 1>: <value>
          <parameter 2>: <value>
          ...

--HG--
extra : rebase_source : 6c9d7a814d5f7ea56373a4b6b0e05c8d14e9dd5f
extra : source : 3b199b4440826312f0695f81eaa6c6e6abeb621f
This commit is contained in:
Wander Lairson Costa 2014-11-26 10:11:35 -08:00
Родитель b3ce5959bb
Коммит 99f5de35e0
3 изменённых файлов: 28 добавлений и 7 удалений

Просмотреть файл

@ -54,13 +54,26 @@ builds:
platforms:
- b2g
types:
opt: tasks/builds/b2g_desktop.yml
debug: tasks/builds/b2g_desktop_debug.yml
opt:
task: tasks/builds/b2g_desktop.yml
debug:
task: tasks/builds/b2g_desktop_debug.yml
linux64-mulet:
platforms:
- Mulet Linux
types:
opt: tasks/builds/mulet_linux.yml
opt:
task: tasks/builds/mulet_linux.yml
emulator-kk:
platfoms:
- b2g
types:
opt:
task: tasks/builds/b2g_emulator.yml
additional-parameters:
debug: 0
b2g-config: 'emulator-kk'
build-type: Opt
# Test section covers the -u options in the try flags
tests:

Просмотреть файл

@ -139,7 +139,8 @@ class TryGraph(object):
"docker-worker:cache:sources-gaia",
"docker-worker:cache:build-b2g-desktop-objects",
"docker-worker:cache:build-mulet-linux-objects",
"docker-worker:cache:tooltool-cache"
"docker-worker:cache:tooltool-cache",
"docker-worker:cache:build-emulator-objects"
]
# XXX: This is a hack figure out how to do this correctly or sanely
@ -165,7 +166,7 @@ class TryGraph(object):
}
for build in job_graph:
build_parameters = copy.copy(parameters)
build_parameters = dict(parameters, **build['additional-parameters'])
build_parameters['build_slugid'] = slugid()
build_task = import_yaml(build['task'], build_parameters)

Просмотреть файл

@ -163,14 +163,21 @@ def parse_commit(message, jobs):
if build_type not in platform_builds['types']:
continue
build_task = platform_builds['types'][build_type]
platform_build = platform_builds['types'][build_type]
build_task = platform_build['task']
if 'additional-parameters' in platform_build:
additional_parameters = platform_build['additional-parameters']
else:
additional_parameters = {}
# Node for this particular build type
result.append({
'task': build_task,
'dependents': extract_tests_from_platform(
jobs['tests'], platform_builds, build_task, tests
)
),
'additional-parameters': additional_parameters
})
return result