diff options
author | 2017-02-03 09:58:13 +0000 | |
---|---|---|
committer | 2017-02-03 10:26:33 +0000 | |
commit | 99da64215e2318ee3967dd928e5842680d58f7c9 (patch) | |
tree | 559c6ad1908f947f93ae533151e94dcab3ff08d2 /src/main/java/com/google/devtools/build/lib/buildeventstream | |
parent | 41c2a26eef89167e807cbc9f33487dc66bb757d3 (diff) |
Also report about individual attempts in a test
For tests known to be flaky, additional attempts are run. Also report
about those in the build-event protocol.
--
Change-Id: I287b0b78478949abe5e14a9fafb1fd463aba8287
Reviewed-on: https://cr.bazel.build/8570
PiperOrigin-RevId: 146454273
MOS_MIGRATED_REVID=146454273
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java | 7 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java index e081671384..360dfdb15c 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventId.java @@ -106,17 +106,22 @@ public final class BuildEventId implements Serializable { return new BuildEventId(cause.getIdProto()); } - public static BuildEventId testResult(Label target, Integer run, Integer shard) { + public static BuildEventId testResult(Label target, Integer run, Integer shard, Integer attempt) { BuildEventStreamProtos.BuildEventId.TestResultId resultId = BuildEventStreamProtos.BuildEventId.TestResultId.newBuilder() .setLabel(target.toString()) .setRun(run) .setShard(shard) + .setAttempt(attempt) .build(); return new BuildEventId( BuildEventStreamProtos.BuildEventId.newBuilder().setTestResult(resultId).build()); } + public static BuildEventId testResult(Label target, Integer run, Integer shard) { + return testResult(target, run, shard, 1); + } + public static BuildEventId testSummary(Label target) { BuildEventStreamProtos.BuildEventId.TestSummaryId summaryId = BuildEventStreamProtos.BuildEventId.TestSummaryId.newBuilder() diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto index 5f86638315..6131112e81 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto @@ -68,11 +68,16 @@ message BuildEventId { string primary_output = 1; } - // Identifier of an event reporting on an individual test run. + // Identifier of an event reporting on an individual test run. The label + // identifies the test that is reported about, the remaining fields are + // in such a way as to uniquely identify the action within a build. In fact, + // attempts for the same test, run, shard tripple are counted sequentially, + // starting with 1. message TestResultId { string label = 1; int32 run = 2; int32 shard = 3; + int32 attempt = 4; } // Identifier of an event reporting the summary of a test. |