Skip to content

Commit

Permalink
Retrieve bazel_sandbox_test data dependency using http_file rule.
Browse files Browse the repository at this point in the history
Fixes bazelbuild#2355.

PiperOrigin-RevId: 174871644
  • Loading branch information
xingao267 authored and damienmg committed Nov 7, 2017
1 parent 7e748d1 commit c439ae1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,9 @@ http_archive(
strip_prefix = "re2-2017-08-01",
sha256 = "938723dc197125392698c5fcf41acb74877866ff140b81fd50b7314bf26f1636",
)

# For src/test/shell/bazel:bazel_sandboxing_test
http_file(
name = 'mount_path_toolchain',
url = 'https://asci-toolchain.appspot.com.storage.googleapis.com/toolchain-testing/mount_path_toolchain.tar.gz',
)
5 changes: 4 additions & 1 deletion src/test/shell/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ sh_test(
name = "bazel_sandboxing_test",
size = "large",
srcs = ["bazel_sandboxing_test.sh"],
data = [":test-deps"],
data = [
":test-deps",
"@mount_path_toolchain//file",
],
tags = ["local"],
)

Expand Down
5 changes: 2 additions & 3 deletions src/test/shell/bazel/bazel_sandboxing_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,9 @@ EOF
target_folder="${target_root}/x86_64-unknown-linux-gnu/sysroot/lib64"
target="${target_folder}/ld-2.19.so"

# Download the toolchain package and unpack it.
wget -q https://asci-toolchain.appspot.com.storage.googleapis.com/toolchain-testing/mount_path_toolchain.tar.gz
# Unpack the toolchain.
mkdir downloaded_toolchain
tar -xf mount_path_toolchain.tar.gz -C ./downloaded_toolchain
tar -xf ${TEST_SRCDIR}/mount_path_toolchain/file/mount_path_toolchain.tar.gz -C ./downloaded_toolchain
chmod -R 0755 downloaded_toolchain

# Replace the target_root_placeholder with the actual target_root
Expand Down

0 comments on commit c439ae1

Please sign in to comment.