aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/external_integration_test.sh
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-05-25 18:20:10 +0000
committerGravatar Yue Gan <yueg@google.com>2016-05-27 08:44:37 +0000
commitaaf87a654b76eb6f44ceb1bb1bdd7e6d869f6690 (patch)
treed42cf71834985b3248638611f0a4ec0bac440a04 /src/test/shell/bazel/external_integration_test.sh
parentf6c9735ff5112c3d2b17a86c70bbadd34f344001 (diff)
Implement zip file symlink support
Fixes #1281. RELNOTES: Symlinks in zip files are now unzipped correctly by http_archive, download_and_extract, etc. -- MOS_MIGRATED_REVID=123233604
Diffstat (limited to 'src/test/shell/bazel/external_integration_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 3350fc2c2e..223a0cb57d 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -86,7 +86,7 @@ function http_archive_helper() {
local do_symlink
[[ $# -gt 1 ]] && [[ "$2" = "do_symlink" ]] && do_symlink=1 || do_symlink=0
- if [[ $write_workspace = 0 ]]; then
+ if [[ $write_workspace -eq 0 ]]; then
# Create a zipped-up repository HTTP response.
repo2=$TEST_TMPDIR/repo2
rm -rf $repo2
@@ -106,8 +106,8 @@ EOF
echo $what_does_the_fox_say
EOF
chmod +x fox/male
+ ln -s male fox/male_relative
if [[ $do_symlink = 1 ]]; then
- ln -s male fox/male_relative
ln -s /fox/male fox/male_absolute
fi
# Add some padding to the .zip to test that Bazel's download logic can
@@ -149,9 +149,9 @@ fi
kill_nc
expect_log $what_does_the_fox_say
+ base_external_path=bazel-out/../external/endangered/fox
+ assert_files_same ${base_external_path}/male ${base_external_path}/male_relative
if [[ $do_symlink = 1 ]]; then
- 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
fi
}