diff options
author | 2017-04-27 16:58:24 +0200 | |
---|---|---|
committer | 2017-04-28 01:00:37 +0200 | |
commit | 6fcc00fcd1bccdfd3281f42135ec6ea257be87b0 (patch) | |
tree | 0f42e5e278d1e1b65f796681ce7d78fa3d5ec5d4 /src | |
parent | ba827ba91d8e23fcfde3ebce538f0a33acec109d (diff) |
BEP: Also show the rule for each target
When available, also show the rule in the TargetComplete event.
This information might help to better interpret the output groups
and the target in general.
Change-Id: I36c06b9658fc72605f29e7e34ad7e5c83faa030c
PiperOrigin-RevId: 154422414
Diffstat (limited to 'src')
3 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java index e0ba78af04..f296202635 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/TargetCompleteEvent.java @@ -142,6 +142,7 @@ public final class TargetCompleteEvent BuildEventStreamProtos.TargetComplete.newBuilder(); builder.setSuccess(!failed()); + builder.setTargetKind(target.getTarget().getTargetKind()); builder.addAllTag(getTags()); builder.addAllOutputGroup(getOutputFilesByGroup(converters.artifactGroupNamer())); 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 c4ae568f91..dca2dc7679 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 @@ -291,6 +291,10 @@ message OutputGroup { message TargetComplete { bool success = 1; + // The kind of target (e.g., e.g. "cc_library rule", "source file", + // "generated file") where the completion is reported. + string target_kind = 5; + // The output files are arranged by their output group. If an output file // is part of multiple output groups, it appears once in each output // group. diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh index a3d66a2a63..27d08739ab 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -128,6 +128,8 @@ function test_basic() { expect_log 'SUCCESS' expect_log 'finish_time' expect_not_log 'aborted' + # target kind for the sh_test + expect_log 'target_kind:.*sh' } function test_suite() { |