aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration/build_event_stream_test.sh
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-05-02 19:08:29 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-05-03 10:57:02 +0200
commit4b7df4f24c25bb84af968234c1adebc8f56eefb0 (patch)
tree77323f8c4b513e1bb715590677509ec8bdecfc77 /src/test/shell/integration/build_event_stream_test.sh
parentd7273274861801353a35ce0f4f5b70266e5cd6a7 (diff)
BEP: Add WorkspaceStatus
Add an event reporting the workspace status as key-value pairs reported via the workspace_status_command. Change-Id: I5791551798a594bc2465f483eb97f9d4fd4c7cfd PiperOrigin-RevId: 154845224
Diffstat (limited to 'src/test/shell/integration/build_event_stream_test.sh')
-rwxr-xr-xsrc/test/shell/integration/build_event_stream_test.sh14
1 files changed, 14 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 27d08739ab..32c128612f 100755
--- a/src/test/shell/integration/build_event_stream_test.sh
+++ b/src/test/shell/integration/build_event_stream_test.sh
@@ -105,6 +105,11 @@ def _simple_aspect_impl(target, ctx):
simple_aspect = aspect(implementation=_simple_aspect_impl)
EOF
touch BUILD
+cat > sample_workspace_status <<EOF
+#!/bin/sh
+echo SAMPLE_WORKSPACE_STATUS workspace_status_value
+EOF
+chmod 755 sample_workspace_status
}
#### TESTS #############################################################
@@ -132,6 +137,15 @@ function test_basic() {
expect_log 'target_kind:.*sh'
}
+function test_workspace_status() {
+ bazel test --experimental_build_event_text_file=$TEST_log \
+ --workspace_status_command=sample_workspace_status pkg:true \
+ || fail "bazel test failed"
+ expect_log_once '^workspace_status'
+ expect_log 'key.*SAMPLE_WORKSPACE_STATUS'
+ expect_log 'value.*workspace_status_value'
+}
+
function test_suite() {
# ...same true when running a test suite containing that test
bazel test --experimental_build_event_text_file=$TEST_log pkg:suite \