Hash :
c4e942d6
        
        Author :
  
        
        Date :
2025-09-25T02:47:45
        
      
Tidy up some README.chromium files in Angle. Backfills the Update Mechanism field for dependencies and cleans up some of the other fields which are out of date. Bug: chromium:379934539 Change-Id: I9a952e905ce00c379c4d593dd67b7e0fc6f1794e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6981101 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
Name: Google Test: Google's C++ Testing Framework
Short Name: googletest
URL: https://github.com/google/googletest.git
Version: N/A
Revision: DEPS
Update Mechanism: Autoroll
License: BSD-3-Clause
License File: src/LICENSE
Shipped: no
Security critical: no
Google Test is imported as-is, to facilitate version bumping. However, the
file/directory layout of Google Test is not yet considered stable. Therefore,
until Google Test's layout stabilizes, Chromium code MUST NOT depend on it
directly. Instead, Chromium code MUST:
* #include the headers in testing/gtest and testing/gmock
* use //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main) in BUILD.gn
  deps
This will allow us to adapt to Google Test changes with minimal disruption.
## Resources for Rolling Googletest in Chrome
### What is Googletest
Googletest is an open source C++ testing framework developed by Google and used
by Chromium. See the [User Guide](https://google.github.io/googletest/).
### Where is Googletest
Googletest is developed in google3 and uses
[copybara](https://github.com/google/copybara) to sync with the public GitHub
repository.
* Development (Googler only): [google3/third\_party/googletest](http://google3/third_party/googletest/)
* GitHub: https://github.com/google/googletest
* Chromium mirror: https://chromium.googlesource.com/external/github.com/google/googletest/
* Locally, [third\_party/googletest/src/](https://source.chromium.org/chromium/chromium/src/+/master:third_party/googletest/src/)
  is a copy of Googletest which is updated via `gclient sync` according to the
  `googletest revision` commit hash in the
  [DEPS file](https://source.chromium.org/chromium/chromium/src/+/master:DEPS;l=244?q=DEPS%20googletest)
### Unblocking Googletest Rolls
1. Roll Googletest to include the breaking change
* Find the hash (on GitHub) of the offending commit
  * If the change came from google3, the CL number can be found in the
    `PiperOrigin-RevId` footer of Copybara commits
* On a fresh checkout, pull in the relevant change. Either:
  * Sync using the DEPS file
```
roll-dep --roll-to=commitish src/third_party/googletest/src/
gclient sync
```
  * Check out the commit directly
```
cd third_party/googletest/src
git remote add up https://github.com/google/googletest.git
git checkout commitish
```
2. Observe errors
* Ideally, this can be done by building locally.
  If the build is successful, this means the change does not affect your OS or
  your compiler flags differ from the trybots
* Upload a CL with the added trybots from
  [Testing Changes to Chromium in Chromium](#testing-changes-to-chromium-in-chromium)
3. Make changes
* To Chromium: create a CL including both the roll and other changes
* To Googletest:
  * Make changes to [third\_party/googletest/src/](https://source.chromium.org/chromium/chromium/src/+/master:third_party/googletest/src/)
    and try building locally. If the fix is successful and you’re confident
    this change will work across all the trybots, create a PR on GitHub or a
    CL to google3 (Googler only) of the changes you made locally to
    [third\_party/googletest/src/](https://source.chromium.org/chromium/chromium/src/+/master:third_party/googletest/src/).
    See [Testing Changes to Googletest in Googletest](#testing-changes-to-googletest-in-googletest)
  * What if I need to make a change to Googletest, but I’m not confident it
    will work with Chromium? Maybe it has to do with a tricky compiler error
    that only affects a specific OS. See
    [Testing Changes to Googletest in Chromium](#testing-changes-to-googletest-in-chromium)
  * Once your Googletest change lands, create a roll which includes both the
    offending commit and your change
### Testing Changes to Chromium in Chromium
Most changes should only require testing via the trybots,
with the following added:
`Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_chromium_cfi_rel_ng;luci.chrome.try:win-chrome`
### Testing Changes to Googletest in Googletest
External: Upload a PR with your proposed changes to GitHub.
This will trigger automated testing.
Googlers: See the [Googletest Developer’s Guide](http://go/gunitdev).
### Testing Changes to Googletest in Chromium
In most cases, testing locally with changes to
[third\_party/googletest/src/](https://source.chromium.org/chromium/chromium/src/+/master:third_party/googletest/src/)
should be enough. But how can you make sure the changes to Googletest actually
work in Chromium? Sometimes it’s not possible to test these changes locally
(different compiler flags, error that only affects a specific OS, etc).
Insert the pwnall repo:
* Development: https://github.com/pwnall/googletest
* Chromium mirror: https://chromium.googlesource.com/external/github.com/pwnall/googletest/
The pwnall repo allows you to make speculative changes to Googletest and run
them against the Chromium trybots. The flow is as follows:
* Create a local remote to the pwnall repo (alternatively, clone it elsewhere):
```
cd third_party/googletest/src
git remote
git remote add up https://github.com/google/googletest.git
git remote add pwnall git@github.com:pwnall/googletest.git
```
* Sync the pwnall repo:
```
git checkout master
git pull up master
git push pwnall master
```
* Make changes on a new branch
* `git push pwnall branch-name`
* Update the `googletest revision` in the
  [DEPS file](https://source.chromium.org/chromium/chromium/src/+/master:DEPS)
  with the commit hash and `/external/github.com/google/googletest.git` to
  `/external/github.com/pwnall/googletest.git`
* Upload the CL to run the change against the Chromium trybots
### Common Problems
* Differences in C++ version and clang compiler flags between Chromium and Googletest
  * Chromium is on C++14, though its dependencies,
    which may use Googletest, may be further behind
  * Look for NACL in build errors. You may need to update your GN args with
    `enable_nacl=true` to reproduce these errors locally
* [A Googletest interface is changed](https://github.com/google/googletest/pull/2718/)
  * Rolling past the commit will fail, since Chromium still uses the old interface
  * Roll past the affecting commit and update uses in Chromium [in one CL](https://crrev.com/c/2709263)
* [A Googletest header is removed](https://github.com/google/googletest/commit/df6b75949b1efab7606ba60c0f0a0125ac95c5af)
  * Rolling past the commit will fail, since Chromium still expects the header to exist
  * Roll past the affecting commit and updates uses in Chromium [in one CL](https://crrev.com/c/2713029)
* [A new Googletest feature](https://github.com/google/googletest/commit/ec94d9f24c92a5090fda5567156d6dde99cdbf31)
  requires [updating tests in Chromium](https://crbug.com/1163396#c8)
### Other Resources
* [AutoRoller](https://autoroll.skia.org/r/googletest-chromium-autoroll) and
  accompanying [configuration file](https://skia.googlesource.com/skia-autoroll-internal-config.git/+/main/skia-public/googletest-chromium.cfg)
* [Bug tracking substantial roll](https://crbug.com/1163396)