1Multiple repo Chromium trybots 2============================== 3 4When a proposed Skia change will require a change in Chromium or Blink it is 5often helpful to locally create the Chromium and Blink changes and test with the 6proposed Skia change. This often happens with Skia API changes and changes 7which affect Blink layout tests. While simple to do locally, this explains how 8to do so on the Chromium trybots. 9 10Skia only changes 11----------------- 12If the Skia patch is already in Rietveld and there are no associated Chromium 13changes, then it is possible to just run the Chromium trybots. This will apply 14the Skia patch and run the bot. 15 16Skia and Chromium changes 17------------------------- 18If the Skia patch is already in Rietveld and there are associated Chromium 19changes, then in the Chromium CL add the following to 20\<chromium>/src/DEPS in the 'hooks' array just before the 'gyp' hook. 21 22 { 23 'name': 'apply_custom_patch', 24 'pattern': '.', 25 'action': ['apply_issue', 26 '--root_dir', 'src/third_party/skia', 27 '--issue', '1873923002', 28 '--patchset', '160001', 29 '--server', 'https://codereview.chromium.org', 30 '--force', 31 '--ignore_deps', 32 '-v', 33 '-v', 34 '--no-auth', 35 '--blacklist', 'DEPS' 36 ], 37 }, 38 39Modify the 'issue' and 'patchset' to the appropriate values. 40If this is for a project other than Skia, update the 'root_dir' and 'server'. 41Note that this can be used multiple times to apply multiple issues. 42 43To find the patchset number in Rietveld use the URL of the '[raw]' (old UI) or 44'Raw Patch' (new UI) link on the desired patch. The last segment of this URL 45has the form 'issue\<issue>_\<patchset>.diff'. 46 47An example of this being used can be seen at 48https://crrev.com/1877673002/#ps120001 . 49 50To test locally, run `gclient runhooks` to update the Skia source code. 51Note that if your local skia patch in `third_party/skia` isn't clean (e.g., you 52already applied some patch to it), then `gclient runhooks` won't successfully 53run. In that case, run `git reset --hard` inside `third_party/skia` before 54`gclient runhooks`. 55 56Arbitrary changes 57----------------- 58If the patch is to files where the above is not possible, then it is still 59possible to patch the files manually by adding the following to 60\<chromium>/src/DEPS in the 'hooks' array just before the 'gyp' hook. 61 62 { 63 'name': 'apply_custom_patch', 64 'pattern': '.', 65 'action': ['python', 66 '-c', 'from distutils.dir_util import copy_tree; copy_tree("src/patch/", "src/");' 67 ], 68 }, 69 70Then, copy all 'out of tree' files into \<chromium>/src/patch/, using the same 71directory structure used by Chromium. When 'gclient runhooks' is run, the files 72in \<chromium>/src/patch/ will be copied to and overwrite corresponding files in 73\<chromium>/src/. For example, if changing \<skia>/include/core/SkPath.h, place 74a copy of the modified SkPath.h at 75\<chromium>/src/patch/third_party/skia/include/core/SkPath.h. 76 77An example of this being used can be seen at 78https://crrev.com/1866773002/#ps20001 . 79 80 81Try the patch 82------------- 83After committing a \<chromium>/src/DEPS or \<chromium>/src/patch/ change 84locally, 'git cl upload' can be used in the usual way. Be sure to add 85'COMMIT=false' to the issue description to avoid accidentally checking it in. 86