Refactor GPU Skia Gold code
Refactors the Skia Gold-related code in //content/test/gpu/gpu_tests
to be the same as //build/android/pylib. All the code that interacts
with Gold is encapsulated in its own class, and users simply run one
method and check its output to perform an image comparison.
Also adds a bunch of unittests (also taken from //build/android/pylib)
since the split makes the code unittest-able.
Drive-by fixes a related TODO in //build/android since the same TODO
was fixed in the GPU code in this CL.
Bug: 1093994
Change-Id: Id2fe1506796695f258069334149550cfaea49f71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2243718
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778514}
diff --git a/docs/gpu/gpu_testing.md b/docs/gpu/gpu_testing.md
index 2d6b0f2..958801a 100644
--- a/docs/gpu/gpu_testing.md
+++ b/docs/gpu/gpu_testing.md
@@ -278,11 +278,11 @@
when run locally. However, if the local run detection code fails for some
reason, you can manually pass some flags to force the same behavior:
-In order to get around the local run issues, simply pass the `--local-run=1`
-flag to the tests. This will disable uploading, but otherwise go through the
-same steps as a test normally would. Each test will also print out `file://`
-URLs to the produced image, the closest image for the test known to Gold, and
-the diff between the two.
+In order to get around the local run issues, simply pass the
+`--local-pixel-tests` flag to the tests. This will disable uploading, but
+otherwise go through the same steps as a test normally would. Each test will
+also print out `file://` URLs to the produced image, the closest image for the
+test known to Gold, and the diff between the two.
Because the image produced by the test locally is likely slightly different from
any of the approved images in Gold, local test runs are likely to fail during
@@ -292,7 +292,7 @@
`--passthrough` flag in order to actually see the link output.
Example usage:
-`run_gpu_integration_test.py pixel --no-skia-gold-failure --local-run=1
+`run_gpu_integration_test.py pixel --no-skia-gold-failure --local-pixel-tests
--passthrough`
If, for some reason, the local run code is unable to determine what the git
@@ -300,7 +300,7 @@
be replaced with an actual Chromium src revision (typically whatever revision
origin/master is currently synced to) in order for the tests to work. This can
be done automatically using:
-``run_gpu_integration_test.py pixel --no-skia-gold-failure --local-run
+``run_gpu_integration_test.py pixel --no-skia-gold-failure --local-pixel-tests
--passthrough --git-revision `git rev-parse origin/master` ``
## Running Binaries from the Bots Locally