aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/external_integration_test.sh
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2016-09-20 15:40:42 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2016-09-21 07:06:32 +0000
commit8539a1215bb58211c7c643005d2389ecafa6f580 (patch)
tree87783de1c37833261051d4c540e52ec81fcbdbfe /src/test/shell/bazel/external_integration_test.sh
parent63010255876a81cf2b0bc4fc5d95a0e1a99df58d (diff)
*** Reason for rollback *** Breaks TensorFlow and other Bazel jobs on ci.bazel.io *** Original change description *** Change execution root for external repositories to be ../repo Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133709658
Diffstat (limited to 'src/test/shell/bazel/external_integration_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 0daf021928..4873710775 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -145,7 +145,7 @@ fi
kill_nc
expect_log $what_does_the_fox_say
- base_external_path="$(bazel info output_base)/external/endangered/fox"
+ base_external_path=bazel-out/../external/endangered/fox
assert_files_same ${base_external_path}/male ${base_external_path}/male_relative
assert_files_same ${base_external_path}/male ${base_external_path}/male_absolute
}
@@ -630,8 +630,7 @@ genrule(
EOF
bazel build @x//:catter &> $TEST_log || fail "Build failed"
- local execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
}
function test_prefix_stripping_zip() {
@@ -660,8 +659,7 @@ genrule(
EOF
bazel build @x//:catter &> $TEST_log || fail "Build failed"
- local execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
}
function test_prefix_stripping_existing_repo() {
@@ -690,8 +688,7 @@ http_archive(
EOF
bazel build @x//:catter &> $TEST_log || fail "Build failed"
- local execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
}
function test_moving_build_file() {
@@ -718,16 +715,14 @@ genrule(
EOF
bazel build @x//:catter &> $TEST_log || fail "Build 1 failed"
- local execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
mv x.BUILD x.BUILD.new || fail "Moving x.BUILD failed"
sed 's/x.BUILD/x.BUILD.new/g' WORKSPACE > WORKSPACE.tmp || \
fail "Editing WORKSPACE failed"
mv WORKSPACE.tmp WORKSPACE
serve_file x.tar.gz
bazel build @x//:catter &> $TEST_log || fail "Build 2 failed"
- local execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
}
function test_changing_build_file() {
@@ -764,14 +759,13 @@ genrule(
EOF
bazel build @x//:catter || fail "Build 1 failed"
- execroot="$(bazel info execution_root)"
- assert_contains "abc" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "abc" bazel-genfiles/external/x/catter.out
sed 's/x.BUILD/x.BUILD.new/g' WORKSPACE > WORKSPACE.tmp || \
fail "Editing WORKSPACE failed"
mv WORKSPACE.tmp WORKSPACE
serve_file x.tar.gz
bazel build @x//:catter &> $TEST_log || fail "Build 2 failed"
- assert_contains "def" "$execroot/../x/bazel-out/local-fastbuild/genfiles/catter.out"
+ assert_contains "def" bazel-genfiles/external/x/catter.out
}
function test_truncated() {