aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/workspace_test.sh
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-09-23 16:37:26 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2016-09-26 07:46:47 +0000
commit5c7f4b0a488a859a94e073cf0946a9552e68ae7c (patch)
tree9718e8d221b602f168b90a314465b3c93319b292 /src/test/shell/bazel/workspace_test.sh
parentb4ac0713bfbe0aaf323a04f411fbd574879e07bd (diff)
Revert creating a convenience symlink usiing the workspace name
Switch back to using the directory name, since there's no good way to get the workspace name from `clean` (yet). Fixes #1795. -- MOS_MIGRATED_REVID=134083065
Diffstat (limited to 'src/test/shell/bazel/workspace_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/workspace_test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/shell/bazel/workspace_test.sh b/src/test/shell/bazel/workspace_test.sh
index 3e6d6ed43f..f6e3a4c11e 100755
--- a/src/test/shell/bazel/workspace_test.sh
+++ b/src/test/shell/bazel/workspace_test.sh
@@ -157,4 +157,19 @@ EOF
expect_log "select() cannot be used in macros called from WORKSPACE files"
}
+function test_clean() {
+ mkdir x
+ cd x
+ cat > WORKSPACE <<EOF
+workspace(name = "y")
+EOF
+ cat > BUILD <<'EOF'
+genrule(name = "z", cmd = "echo hi > $@", outs = ["x.out"], srcs = [])
+EOF
+ bazel build //:z &> $TEST_log || fail "Expected build to succeed"
+ [ -L bazel-x ] || fail "bazel-x should be a symlink"
+ bazel clean
+ [ ! -L bazel-x ] || fail "bazel-x should have been removed"
+}
+
run_suite "workspace tests"