diff options
author | 2017-04-04 15:03:23 +0000 | |
---|---|---|
committer | 2017-04-04 18:39:53 +0200 | |
commit | 617bb896dc5d2b815449459e991c577237d7a7fc (patch) | |
tree | e25a4bfe6e925ad2cff32c71447af412a77faf2e /src/main/java/com/google/devtools/build/lib/rules/test | |
parent | 0297702d9533142e6c326660f913899d25b89b5d (diff) |
BEP: provide events a generic converter class
Change the BuildEvent interface to accept a generic class of converters.
In this way, we won't have to change it again in the future, once more
converters are needed. In fact, a new converter is needed right now (will
be added in a follow-up patch) to allow build events to know the name of
named artifact groups already reported in the stream.
Change-Id: Ibb32ea5fff361e21bcf2d34818d8351a1da7a2e3
PiperOrigin-RevId: 152131870
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/test')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java b/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java index 8e01b0b1ce..2bddc64e87 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java +++ b/src/main/java/com/google/devtools/build/lib/rules/test/TestAttempt.java @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.rules.test; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.buildeventstream.BuildEvent; +import com.google.devtools.build.lib.buildeventstream.BuildEventConverters; import com.google.devtools.build.lib.buildeventstream.BuildEventId; import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos; import com.google.devtools.build.lib.buildeventstream.GenericBuildEvent; @@ -130,7 +131,8 @@ public class TestAttempt implements BuildEvent { } @Override - public BuildEventStreamProtos.BuildEvent asStreamProto(PathConverter pathConverter) { + public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters converters) { + PathConverter pathConverter = converters.pathConverter(); BuildEventStreamProtos.TestResult.Builder builder = BuildEventStreamProtos.TestResult.newBuilder(); builder.setStatus(BuildEventStreamerUtils.bepStatus(status)); |