diff options
Diffstat (limited to 'src/test/shell/integration/build_event_stream_test.sh')
-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 \ |