diff options
author | 2017-05-03 13:48:23 +0200 | |
---|---|---|
committer | 2017-05-03 17:26:12 +0200 | |
commit | 9e37b2e52d6e42eec15712942c7f208b64c651e5 (patch) | |
tree | bfbe084d3007b4b4465fc335d833f3dbd68f7810 /src/test | |
parent | ea7d482af9a067ca377ca3d9914f13ef0da20404 (diff) |
BEP: Report stdout/stderr
By recording registering a properly synchronized OutErr as listener
and providing it as OutErrProvider to the BuildEventStreamer.
Change-Id: Id553fcdb85327be28561634268511304fcc2ad3f
PiperOrigin-RevId: 154943162
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/integration/build_event_stream_test.sh | 16 |
1 files changed, 16 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 32c128612f..f6cd382b84 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -384,4 +384,20 @@ function test_loading_failure_keep_going() { # expect_not_log 'aborted' # } +function test_stdout_stderr_reported() { + # Verify that bazel's stdout/stderr is included in the build event stream. + + # Make sure we generate enough output on stderr + bazel clean --expunge + bazel test --experimental_build_event_text_file=$TEST_log --curses=no \ + pkg:slow 2>stderr.log || fail "slowtest failed" + # Take a line that is likely not the output of an action (possibly reported + # independently in the stream) and still characteristic enough to not occur + # in the stream by accident. Taking the first line mentioning the test name + # is likely some form of progress report. + sample_line=`cat stderr.log | grep 'slow' | head -1 | tr '[]' '..'` + echo "Sample regexp of stderr: ${sample_line}" + expect_log "stderr.*$sample_line" +} + run_suite "Integration tests for the build event stream" |