diff options
author | Kristina Chodorow <kchodorow@google.com> | 2016-04-20 17:43:45 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-04-21 10:57:47 +0000 |
commit | 382b5881fc0f3e0ec162e78fb31569e8d36c2a8d (patch) | |
tree | e816cda976451cfb9a8da484c6bb0f5536a99848 /src/test/shell/bazel | |
parent | b1945fe6ecc62dc245cd77ec5e2d343db2ddd893 (diff) |
Add a workspace name to Skylark repositories
This prevents an ugly error when the main repository name is set.
Fixes #1166.
--
MOS_MIGRATED_REVID=120352395
Diffstat (limited to 'src/test/shell/bazel')
-rwxr-xr-x | src/test/shell/bazel/skylark_repository_test.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/shell/bazel/skylark_repository_test.sh b/src/test/shell/bazel/skylark_repository_test.sh index 8cd50057fc..e512b70eef 100755 --- a/src/test/shell/bazel/skylark_repository_test.sh +++ b/src/test/shell/bazel/skylark_repository_test.sh @@ -256,6 +256,9 @@ EOF function test_skylark_local_repository() { create_new_workspace repo2=$new_workspace_dir + # Remove the WORKSPACE file in the symlinked repo, so our skylark rule has to + # create one. + rm $repo2/WORKSPACE cat > BUILD <<'EOF' genrule(name='bar', cmd='echo foo | tee $@', outs=['bar.txt']) @@ -282,6 +285,7 @@ EOF bazel build @foo//:bar >& $TEST_log || fail "Failed to build" expect_log "foo" + expect_not_log "Workspace name in .*/WORKSPACE (@__main__) does not match the name given in the repository's definition (@foo)" cat bazel-genfiles/external/foo/bar.txt >$TEST_log expect_log "foo" } |