Commit 3bca72ea authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Fix Skia Gold links for batched tests

Fixes Skia Gold triage links and test failures being associated with all
tests in a batch, instead only associating them with the result for the
particular test that produced the bad image.

This is handled by including the full test name in the JSON that gets
pulled from the device, then using that in the test runner to look for
matching results to modify.

Bug: 1146498
Change-Id: I5cad7333aa69332f3e46165a6a73c25a0aa6266f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521249Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825484}
parent d48fb25a
......@@ -88,6 +88,7 @@ public class RenderTestRule extends TestWatcher {
// State for a test method.
private String mTestClassName;
private String mFullTestName;
private boolean mHasRenderTestFeature;
/** Parameterized tests have a prefix inserted at the front of the test description. */
......@@ -137,6 +138,7 @@ public class RenderTestRule extends TestWatcher {
protected void starting(Description desc) {
// desc.getClassName() gets the fully qualified name.
mTestClassName = desc.getTestClass().getSimpleName();
mFullTestName = desc.getClassName() + "#" + desc.getMethodName();
Feature feature = desc.getAnnotation(Feature.class);
mHasRenderTestFeature =
......@@ -202,6 +204,10 @@ public class RenderTestRule extends TestWatcher {
goldKeys.put("revision_description", mSkiaGoldRevisionDescription);
}
goldKeys.put("fail_on_unsupported_configs", String.valueOf(mFailOnUnsupportedConfigs));
// This key will be deleted by the test runner before uploading to Gold. It is used to
// differentiate results from different tests if the test runner has batched multiple
// tests together in a single run.
goldKeys.put("full_test_name", mFullTestName);
} catch (JSONException e) {
Assert.fail("Failed to create Skia Gold JSON keys: " + e.toString());
}
......
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