Re-enable test_sandbox_mount_customized_path.

Fix #2760.

Change-Id: Iab98fad1ca025c4af7a7048bb7048947ef90d61d
PiperOrigin-RevId: 175030992
diff --git a/src/test/shell/bazel/bazel_sandboxing_test.sh b/src/test/shell/bazel/bazel_sandboxing_test.sh
index 04da8cb..a662d18 100755
--- a/src/test/shell/bazel/bazel_sandboxing_test.sh
+++ b/src/test/shell/bazel/bazel_sandboxing_test.sh
@@ -544,8 +544,14 @@
   expect_log "Executing genrule //:test failed:"
 }
 
-# TODO(xingao) Disabled due to https://github.com/bazelbuild/bazel/issues/2760
-function DISABLED_test_sandbox_mount_customized_path () {
+function test_sandbox_mount_customized_path () {
+
+  if ! [ "${PLATFORM-}" = "linux" -a \
+    "$(cat /dev/null /etc/*release | grep 'DISTRIB_CODENAME=' | sed 's/^.*=//')" = "trusty" ]; then
+    echo "Skipping test: the toolchain used in this test is only supported on trusty."
+    return 0
+  fi
+
   # Create BUILD file
   cat > BUILD <<'EOF'
 package(default_visibility = ["//visibility:public"])
@@ -584,6 +590,9 @@
   tar -xf ${TEST_SRCDIR}/mount_path_toolchain/file/mount_path_toolchain.tar.gz -C ./downloaded_toolchain
   chmod -R 0755 downloaded_toolchain
 
+  # Create an empty WORKSPACE file for the local repository.
+  touch downloaded_toolchain/WORKSPACE
+
   # Replace the target_root_placeholder with the actual target_root
   sed -i "s|target_root_placeholder|$target_root|g" downloaded_toolchain/CROSSTOOL