tree: c38ee244a91690c7c4cdfcb9c8784f6e4f014121 [path history] [tgz]
  1. android/
  2. chromium/
  3. dart/
  4. drmemory/
  5. goma/
  6. gtest/
  7. ios/
  8. recipe_modules/
  9. recipes/
  10. syzygy/
  11. unittests/
  12. .gitattributes
  13. __init__.py
  14. annotated_run.py
  15. annotation_utils.py
  16. apply_svn_patch.py
  17. archive_profiling_data.py
  18. archive_source_codesearch.py
  19. bootstrap.py
  20. bot_update.py
  21. build_directory.py
  22. builder_utils.py
  23. chromium_commands.py
  24. cipd.py
  25. cipd_bootstrap_v2.py
  26. clang_revision.py
  27. cleanup_temp.py
  28. crash_utils.py
  29. daemonizer.py
  30. extract_build.py
  31. gatekeeper.json
  32. gatekeeper_emoji.json
  33. gatekeeper_trees.json
  34. gce.py
  35. gclient_safe_revert.py
  36. generate_profile_shim.py
  37. git_setup.py
  38. goma_bq_utils.py
  39. goma_utils.py
  40. gsutil
  41. gsutil.bat
  42. gsutil_cp_dir.py
  43. gsutil_download.py
  44. gtest_slave_utils.py
  45. histogram_results_parser.py
  46. infra_platform.py
  47. kill_processes.py
  48. list_tests.py
  49. logdog-params.pyl
  50. logdog_bootstrap.py
  51. monitoring_utils.py
  52. OWNERS
  53. performance_log_processor.py
  54. process_dumps.py
  55. README.md
  56. README.recipes.md
  57. reboot_tools.py
  58. recipes.py
  59. remote_run.py
  60. results_dashboard.py
  61. robust_tempdir.py
  62. runbuild.py
  63. runbuild_utils.py
  64. runhooks_wrapper.py
  65. runisolatedtest.py
  66. runtest.py
  67. send_analyze_event.py
  68. slave_utils.py
  69. tee.py
  70. telemetry_utils.py
  71. timeout.py
  72. update_nacl_sdk.py
  73. update_scripts.py
  74. upload_goma_logs.py
  75. upload_goma_logs.py.vpython
  76. upload_perf_dashboard_results.py
  77. xvfb.py
  78. zip_build.py
scripts/slave/README.md

scripts/slave

This directory contains scripts which run on buildbot ‘slave’ machines. The primary form of these scripts is in recipes, which live in the recipes and recipe_modules folders.

Quick How-To-Modify-Recipes

  1. Make your changes to the various recipes or recipe_modules that you need.

  2. Run the simulator by running ./recipes.py test train.

    This will run through all the simulation inputs generated by the recipes' GenTests methods, executing the recipe code for each one, using the simulation inputs to mock the output of the various steps. The list of steps that the recipe would have run, given that simulation‘s inputs, will be recorded as a JSON file in the recipe’s <recipe.expected> folder.

  3. Upload the recipe changes as well as the new expectation files.

  4. Review the expectation file diffs to make sure they‘re actually what you intended. If your CL affects many expectation files, it’s STRONGLY recommended to make your CL change as small as possible so that it's easy to correlate the code change with the expectation changes.

The recipe simulator insists on 100% line coverage of the recipes. If it complains about uncovered lines, you should add a new simulation case to the GenTests method of the given recipe. Give it a descriptive name for what case you're trying to cover, and give it step output values which would lead to that case. For example 'report_bad_targets_on_compile_failure' might have the compile step exit with a return code of 1 and emit a JSON file containing the bad target names. You would instruct the test in GenTests to do this, and when the simulator runs it, it will use your supplied return code and JSON file to simulate that step having those outputs.

Failing to train the expectations will cause the CQ to reject the patch; it will run the simulation tests in test mode, which checks to see that the expectation files match the current recipe code, but doesn't emit the new JSON files if it finds a descrepancy.