diff options
author | 2016-05-25 11:48:10 +0000 | |
---|---|---|
committer | 2016-05-25 11:53:48 +0000 | |
commit | 36a265772e6e901d4c689634141850814179479c (patch) | |
tree | 32b5241ecb5e63caf584c6796713cbee4a0bcd3a /src/test/shell | |
parent | 52594355dbeb9496e2775f3c438c1c887ac03f0e (diff) |
Better error message when combine //visibility:(public|private) with other forms.
--
MOS_MIGRATED_REVID=123201777
Diffstat (limited to 'src/test/shell')
-rwxr-xr-x | src/test/shell/bazel/bazel_rules_test.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_rules_test.sh b/src/test/shell/bazel/bazel_rules_test.sh index bb3768685b..6b7c04ed1d 100755 --- a/src/test/shell/bazel/bazel_rules_test.sh +++ b/src/test/shell/bazel/bazel_rules_test.sh @@ -384,4 +384,20 @@ EOF bazel build //a:a || fail "build failed" } +function test_visibility() { + mkdir visibility + cat > visibility/BUILD <<EOF +cc_library( + name = "foo", + visibility = [ + "//foo/bar:__pkg__", + "//visibility:public", + ], +) +EOF + + bazel build //visibility:foo &> $TEST_log && fail "Expected failure" || true + expect_log "Public or private visibility labels (e.g. //visibility:public or //visibility:private) cannot be used in combination with other labels" +} + run_suite "rules test" |