Commit e123a3d4 authored by Steve Kobes's avatar Steve Kobes Committed by Commit Bot

Add documentation on bisecting layout test regressions.

Bug: 740070
Change-Id: I26fa14774e0bc697346033af805dd8bf68e14d0c
Reviewed-on: https://chromium-review.googlesource.com/578730Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488078}
parent f287b765
......@@ -426,6 +426,42 @@ machine?
* In the loaded devtools, set any required breakpoints and execute `test()` in
the console to actually start the test.
## Bisecting Regressions
You can use [`git bisect`](https://git-scm.com/docs/git-bisect) to find which
commit broke (or fixed!) a layout test in a fully automated way. Unlike
[bisect-builds.py](http://dev.chromium.org/developers/bisect-builds-py), which
downloads pre-built Chromium binaries, `git bisect` operates on your local
checkout, so it can run tests with `content_shell`.
Bisecting can take several hours, but since it is fully automated you can leave
it running overnight and view the results the next day.
To set up an automated bisect of a layout test regression, create a script like
this:
```
#!/bin/bash
# Exit code 125 tells git bisect to skip the revision.
gclient sync || exit 125
ninja -C out/Debug -j100 blink_tests || exit 125
blink/tools/run_layout_tests.sh -t Debug \
--no-show-results --no-retry-failures \
path/to/layout/test.html
```
Modify the `out` directory, ninja args, and test name as appropriate, and save
the script in `~/checkrev.sh`. Then run:
```
chmod u+x ~/checkrev.sh # mark script as executable
git bisect start <badrev> <goodrev>
git bisect run ~/checkrev.sh
git bisect reset # quit the bisect session
```
## Rebaselining Layout Tests
*** promo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment