diff options
author | 2017-05-31 18:02:43 +0200 | |
---|---|---|
committer | 2017-06-01 14:05:13 +0200 | |
commit | 16a107dca10c49d2365886df4a06f50ce2e4aeb1 (patch) | |
tree | 4a9fa65b9ff1b79ff3481af33f9cbd7b370a814a /src/test/shell/integration/build_event_stream_test.sh | |
parent | d3040ea6c3ad9ed269d1f9dceeedf42efbe67403 (diff) |
BEP: report visibility errors
On finding a visibility error, report it directly for that target, instead of
relying on the implict "abort" message for targets that have not been built.
Change-Id: I5e45722a1117afca3bc8eeebd05179425b995172
PiperOrigin-RevId: 157592518
Diffstat (limited to 'src/test/shell/integration/build_event_stream_test.sh')
-rwxr-xr-x | src/test/shell/integration/build_event_stream_test.sh | 24 |
1 files changed, 24 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 67d85019a5..4d2fee4c45 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -110,6 +110,22 @@ cat > sample_workspace_status <<EOF echo SAMPLE_WORKSPACE_STATUS workspace_status_value EOF chmod 755 sample_workspace_status +mkdir -p visibility/hidden +cat > visibility/hidden/BUILD <<EOF +genrule( + name = "hello", + outs = ["hello.txt"], + cmd = "echo Hello World > \$@", +) +EOF +cat > visibility/BUILD <<EOF +genrule( + name = "cannotsee", + outs = ["cannotsee.txt"], + srcs = ["//visibility/hidden:hello"], + cmd = "cp \$< \$@", +) +EOF } #### TESTS ############################################################# @@ -383,6 +399,14 @@ function test_loading_failure() { expect_not_log 'aborted' } +function test_visibility_failure() { + bazel shutdown + (bazel build --experimental_build_event_text_file=$TEST_log \ + //visibility:cannotsee && fail "build failure expected") || true + expect_log '^analysis_failed' + expect_not_log '^aborted' +} + function test_loading_failure_keep_going() { (bazel build --experimental_build_event_text_file=$TEST_log \ -k //does/not/exist && fail "build failure expected") || true |