diff options
author | 2017-03-27 16:14:44 +0000 | |
---|---|---|
committer | 2017-03-28 19:48:52 +0000 | |
commit | e67b00767c9c578bf23fa77fda85a8beec0682c4 (patch) | |
tree | e7bcef0e49285a46744c7ffbd91556587c3e69bc /src/test | |
parent | 34efd79c3c932d635eff8c3cbedd1293995521c4 (diff) |
BEP: Unconditionally report ExtraActions
...irrespective of their success status. While a build typically
contains too many successful actions to report them all, extra actions
included in a build are worth reporting.
--
Change-Id: I6b20935895aa7b16836d6271f456176a7113317e
Reviewed-on: https://cr.bazel.build/9519
PiperOrigin-RevId: 151328633
MOS_MIGRATED_REVID=151328633
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/integration/build_event_stream_test.sh | 22 |
1 files changed, 22 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 68682e84f3..0d334a0f5a 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -72,6 +72,16 @@ genrule( cmd = "echo foo > \\"\$@\\"", tags = ["tag1", "tag2"] ) +action_listener( + name = "listener", + mnemonics = ["Genrule"], + extra_actions = [":extra"], + visibility = ["//visibility:public"], +) +extra_action( + name = "extra", + cmd = "echo Hello World", +) EOF cat > simpleaspect.bzl <<EOF def _simple_aspect_impl(target, ctx): @@ -245,6 +255,18 @@ function test_target_complete() { expect_log 'tag2' } +function test_extra_action() { + # verify that normal successful actions are not reported, but extra actions + # are + bazel build --experimental_build_event_text_file=$TEST_log \ + pkg:output_files_and_tags || fail "bazel build failed" + expect_not_log '^action' + bazel build --experimental_build_event_text_file=$TEST_log \ + --experimental_action_listener=pkg:listener \ + pkg:output_files_and_tags || fail "bazel build with listener failed" + expect_log '^action' +} + function test_aspect_artifacts() { bazel build --experimental_build_event_text_file=$TEST_log \ --aspects=simpleaspect.bzl%simple_aspect \ |