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