aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar dannark <dannark@google.com>2018-08-07 16:31:52 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-07 16:33:08 -0700
commited598bc180ff347f50ca70a04074f430185aa9c5 (patch)
tree04c996e8e700714a41d301c4f5b1e9b82b3bbe3a /src/test/shell
parent075ab1e258902360bbd039d4b9fb4a6041a988d2 (diff)
Put main repo remapping behind a flag.
RELNOTES: None PiperOrigin-RevId: 207801155
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/workspace_test.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test/shell/bazel/workspace_test.sh b/src/test/shell/bazel/workspace_test.sh
index 680d71153e..daed1375c4 100755
--- a/src/test/shell/bazel/workspace_test.sh
+++ b/src/test/shell/bazel/workspace_test.sh
@@ -574,7 +574,8 @@ a = 1
EOF
cd mainrepo
- bazel query //... &>"$TEST_log" || fail "Expected query to succeed"
+ bazel query --experimental_remap_main_repo //... &>"$TEST_log" \
+ || fail "Expected query to succeed"
expect_log "def.bzl loaded"
expect_not_log "external"
}
@@ -601,7 +602,8 @@ EOF
# the bzl file should be loaded from the main workspace and
# not as an external repository
cd mainrepo
- bazel query @a//... &>"$TEST_log" || fail "Expected query to succeed"
+ bazel query --experimental_remap_main_repo @a//... &>"$TEST_log" \
+ || fail "Expected query to succeed"
expect_log "def.bzl loaded"
expect_not_log "external"
@@ -618,7 +620,8 @@ EOF
# now that @mainrepo doesn't exist within workspace "a",
# the query should fail
cd mainrepo
- bazel query --experimental_enable_repo_mapping @a//... &>"$TEST_log" \
+ bazel query --experimental_remap_main_repo --experimental_enable_repo_mapping \
+ @a//... &>"$TEST_log" \
&& fail "Failure expected" || true
}