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