diff options
author | 2017-04-10 15:13:59 +0000 | |
---|---|---|
committer | 2017-04-11 10:49:54 +0200 | |
commit | 4901d8be1bc7f868b434a387b6feab20be12b2b1 (patch) | |
tree | 2343fb2415492ddbd473bceb7f5b9a8463f97dff /src/test | |
parent | a3cf662f26feddfff671c41eb876fd63c3f5a232 (diff) |
Make TargetCompleteEvent declare its artifact groups
To avoid artifacts rolled up from other targets to be reported several
times.
Change-Id: I8a329f1c53ad3fcb37cc6602b906472dfce1a12f
PiperOrigin-RevId: 152688681
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/integration/build_event_stream_test.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh index 4d9480e9c1..01ed82847c 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -43,6 +43,7 @@ sleep 1 exit 0 EOF chmod 755 pkg/slowtest.sh + touch pkg/sourcefileA pkg/sourcefileB pkg/sourcefileC cat > pkg/BUILD <<EOF sh_test( name = "true", @@ -82,6 +83,14 @@ extra_action( name = "extra", cmd = "echo Hello World", ) +filegroup( + name = "innergroup", + srcs = ["sourcefileA", "sourcefileB"], +) +filegroup( + name = "outergroup", + srcs = ["sourcefileC", ":innergroup"], +) EOF cat > simpleaspect.bzl <<EOF def _simple_aspect_impl(target, ctx): @@ -346,4 +355,14 @@ function test_loading_failure_keep_going() { expect_not_log 'aborted' } +function test_artifact_dedup() { + bazel build --experimental_build_event_text_file=$TEST_log \ + pkg:innergroup pkg:outergroup \ + || fail "bazel build failed" + expect_log_once "name.*sourcefileA" + expect_log_once "name.*sourcefileB" + expect_log_once "name.*sourcefileC" + expect_not_log 'aborted' +} + run_suite "Integration tests for the build event stream" |