From dd7bd50ad1f6cdddea218c704c933239e31ce7bf Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 30 Jun 2016 14:26:11 +0000 Subject: Make repository name warning less noisy This way it won't print if the repo maintainer doesn't set the repo name. -- MOS_MIGRATED_REVID=126300205 --- src/test/shell/bazel/local_repository_test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/test/shell') diff --git a/src/test/shell/bazel/local_repository_test.sh b/src/test/shell/bazel/local_repository_test.sh index d078cadba3..41b5319f6b 100755 --- a/src/test/shell/bazel/local_repository_test.sh +++ b/src/test/shell/bazel/local_repository_test.sh @@ -504,6 +504,28 @@ EOF expect_log "//external:my_repo" } +function test_warning() { + local bar=$TEST_TMPDIR/bar + rm -rf "$bar" + mkdir -p "$bar" + touch "$bar/WORKSPACE" "$bar/BUILD" + cat > WORKSPACE < $TEST_log || fail "Build failed" + expect_not_log "Workspace name in .* does not match the name given in the repository's definition (@bar); this will cause a build error in future versions." + + cat > "$bar/WORKSPACE" < $TEST_log || fail "Build failed" + expect_log "Workspace name in .* does not match the name given in the repository's definition (@bar); this will cause a build error in future versions." +} + function test_override_workspace_file() { local bar=$TEST_TMPDIR/bar mkdir -p "$bar" -- cgit v1.2.3