0
Files
android_webview
apps
ash
base
build
build_overrides
cc
chrome
chrome_elf
chromecast
chromeos
cloud_print
components
content
courgette
crypto
dbus
device
docs
accessibility
autofill
design
gpu
images
infra
ios
login
media
memory
memory-infra
privacy
process
security
speed
sync
testing
ui
OWNERS
README.md
accessibility.md
ad_tagging.md
adding_to_third_party.md
android_accessing_cpp_enums_in_java.md
android_build_instructions.md
android_cast_build_instructions.md
android_debugging_instructions.md
android_emulator.md
android_logging.md
android_native_libraries.md
android_studio.md
android_test_instructions.md
angle_in_chromium.md
atom.md
bitmap_pipeline.md
browser_view_resizer.md
building_old_revisions.md
callback.md
ccache_mac.md
chrome_os_logging.md
chrome_settings.md
chromedriver_status.md
chromeos_build_instructions.md
chromium_browser_vs_google_chrome.md
chromoting_android_hacking.md
cipd.md
cl_respect.md
clang.md
clang_code_coverage_wrapper.md
clang_format.md
clang_static_analyzer.md
clang_tidy.md
clang_tool_refactoring.md
clion_dev.md
closure_compilation.md
cocoa_tips_and_tricks.md
code_coverage.md
code_reviews.md
component_build.md
cr_respect.md
cr_user_manual.md
cygwin_dll_remapping_failure.md
debugging_with_crash_keys.md
disassemble_code.md
documentation_best_practices.md
documentation_guidelines.md
eclipse.md
emacs.md
erc_irc.md
fuchsia_build_instructions.md
fuchsia_gardening.md
fuchsia_sdk_updates.md
get_the_code.md
git_cookbook.md
git_tips.md
google_play_services.md
graphical_debugging_aid_chromium_views.md
gtk_vs_views_gtk.md
gwp_asan.md
how_to_add_your_feature_flag.md
how_to_extend_web_test_framework.md
inlined_stack_traces.md
installation_at_vmware.md
ios_build_instructions.md
ios_infra.md
ios_voiceover.md
ipc_fuzzer.md
jumbo.md
kiosk_mode.md
linux_build_instructions.md
linux_building_debug_gtk.md
linux_cast_build_instructions.md
linux_cert_management.md
linux_chromium_arm.md
linux_chromium_packages.md
linux_crash_dumping.md
linux_debugging.md
linux_debugging_gtk.md
linux_debugging_ssl.md
linux_dev_build_as_default_browser.md
linux_development.md
linux_eclipse_dev.md
linux_graphics_pipeline.md
linux_gtk_theme_integration.md
linux_hw_video_decode.md
linux_minidump_to_core.md
linux_password_storage.md
linux_pid_namespace_support.md
linux_plugins.md
linux_profiling.md
linux_proxy_config.md
linux_running_asan_tests.md
linux_sandbox_ipc.md
linux_sandboxing.md
linux_suid_sandbox.md
linux_suid_sandbox_development.md
linux_sysroot.md
linux_zygote.md
luci_migration_faq.md
mac_build_instructions.md
mojo_guide.md
network_traffic_annotations.md
new_port_policy.md
old_chromoting_build_instructions.md
optimizing_web_uis.md
optional.md
origin_trials_integration.md
ozone_drm_for_linux.md
ozone_overview.md
parsing_test_results.md
piranha_plant.md
profiling.md
profiling_content_shell_on_android.md
proxy_auto_config.md
qtcreator.md
release_branch_guidance.md
retrieving_code_analysis_warnings.md
seccomp_sandbox_crash_dumping.md
servicification.md
static_initializers.md
sublime_ide.md
system_hardening_features.md
tab_helpers.md
test_descriptions.md
threading_and_tasks.md
threading_and_tasks_faq.md
tour_of_luci_ui.md
tpm_quick_ref.md
translation_screenshots.md
updating_clang.md
updating_clang_format_binaries.md
useful_urls.md
user_data_dir.md
user_handle_mapping.md
using_a_linux_chroot.md
using_build_runner.md
vanilla_msysgit_workflow.md
vscode.md
web_tests_linux.md
webui_explainer.md
webui_in_components.md
webview_policies.md
win_cross.md
win_order_files.md
windows_build_instructions.md
windows_split_dll.md
working_remotely_with_android.md
writing_clang_plugins.md
extensions
gin
google_apis
google_update
gpu
headless
infra
ios
ipc
jingle
mash
media
mojo
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
webrunner
.clang-format
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore
.gn
.vpython
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
ENG_REVIEW_OWNERS
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings
src/docs/using_build_runner.md
nodir 06cbaa02ca A batch of docs style fixes.
R=andybons@chromium.org
BUG=524256

Review URL: https://codereview.chromium.org/1319543002

Cr-Commit-Position: refs/heads/master@{#345360}
2015-08-25 17:16:40 +00:00

3.3 KiB

Instructions on how to use the buildrunner to execute builds.

The buildrunner is a script which extracts buildsteps from builders and runs them locally on the slave. It is being developed to simplify development on and reduce the complexity of the Chromium build infrastructure. When provided a master name (with master.cfg inside) and a builder, it will either execute steps sequentially or output information about them.

runbuild.py is the main script, while runit.py is a convenience script that sets up PYTHONPATH for you. Note that you can use runit.py to conveniently run other scripts in the build/ directory.

[TOC]

Master/Builder Selection

scripts/tools/runit.py scripts/slave/runbuild.py --list-masters

will list all masters in the search path. Select a mastername (alternatively, use --master-dir to use a specific directory).

Next, we need to pick a builder or slave hostname to build. The slave hostname is only used to locate a suitable builder, so it need not be the actual hostname of the slave you're on.

To list all the builders in a master, run:

scripts/tools/runit.py scripts/slave/runbuild.py mastername --list-builders

Example, if you're in /home/user/chromium/build/scripts/slave/:

scripts/tools/runit.py scripts/slave/runbuild.py chromium --list-builders

will show you which builders are available under the chromium master.

Step Inspection and Execution

You can check out the list of steps without actually running them like so:

scripts/tools/runit.py scripts/slave/runbuild.py chromium  build56-m1 --list-steps

Note that some exotic steps, such as gclient steps, won't show up in buildrunner.) You can show the exact commands of most steps with --show- commands:

scripts/tools/runit.py scripts/slave/runbuild.py chromium  build56-m1 --show-commands

Finally, you can run the build with:

scripts/tools/runit.py scripts/slave/runbuild.py mastername buildername/slavehost

Example, if you're in /home/user/chromium/build/scripts/slave/:

scripts/tools/runit.py scripts/slave/runbuild.py chromium  build56-m1

or

scripts/tools/runit.py scripts/slave/runbuild.py chromium  'Linux x64'

--stepfilter and --stepreject`` can be used to filter steps to execute based on a regex (you can see which with --list-steps). See -help`for more info.

Properties

Build properties and factory properties can be specified using --build- properties and --factory-properties, respectively. Since build properties contain a master and builder directive, any master or builder options on the CLI are ignored. Properties can be inspected with either or both of --output-build- properties or --output-factory-properties.

Monitoring

You can specify a log destination (including '-' for stdout) with --logfile. Enabling --annotate will enable annotator output.

Using Within a Buildstep

The an annotated buildrunner can be invoked via chromium_commands.AddBuildStep(). Set the master, builder, and any stepfilter/reject options in factory_properties. For example usage, see f_linux_runnertest in master.chromium.fyi/master.cfg and check_deps2git_runner in chromium_factory.py

More Information

Running with --help provides more detailed usage and options. If you have any questions or issues please contact xusydoc@chromium.org.