aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2016-07-21 15:24:55 +0000
committerGravatar John Cater <jcater@google.com>2016-07-21 20:37:03 +0000
commit5eb86fe884762c0f638ef1cb6245c25ef0f76c2f (patch)
treeb09ecd52b9e06f2e71a9b200997013806414f05a /src/test/shell
parentadb22af6524df64e0d09d93ef7ba904e4470c814 (diff)
Export xcode_locator's source file under tools/osx/ to make it available for reference by future repository rules. Removes the xcode-locator binary file under tools/objc. Originally, the precompiled binary was going to be referenced, but it's easier to build from source in the repository rule.
-- MOS_MIGRATED_REVID=128063694
Diffstat (limited to 'src/test/shell')
-rw-r--r--src/test/shell/bazel/BUILD2
-rwxr-xr-xsrc/test/shell/bazel/bazel_apple_test.sh15
-rwxr-xr-xsrc/test/shell/bazel/bazel_objc_test.sh2
3 files changed, 15 insertions, 4 deletions
diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 95151b40e2..a3d9751b3a 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -39,7 +39,7 @@ filegroup(
"//src/tools/xcode/stdredirect:StdRedirect.dylib",
"//src/tools/xcode/swiftstdlibtoolwrapper",
"//src/tools/xcode/xcrunwrapper",
- "//src/tools/xcode/xcodelocator:xcode-locator",
+ "//tools/osx:xcode-locator",
"//third_party/iossim",
],
"//conditions:default": [],
diff --git a/src/test/shell/bazel/bazel_apple_test.sh b/src/test/shell/bazel/bazel_apple_test.sh
index 6eb6ca265a..a8e6bea721 100755
--- a/src/test/shell/bazel/bazel_apple_test.sh
+++ b/src/test/shell/bazel/bazel_apple_test.sh
@@ -33,8 +33,19 @@ function set_up() {
# Find where Xcode 7 (any sub-version will do) is located and get the iOS SDK
# version it contains.
# TODO(b/27267941): This is a hack until the bug is fixed.
- XCODE_LOCATOR="$(bazel info output_base)/external/bazel_tools/tools/objc/xcode-locator"
- XCODE_INFO=$($XCODE_LOCATOR -v | grep -m1 7)
+ rm -rf xcodehelper
+ mkdir -p xcodehelper
+ cat > xcodehelper/BUILD <<EOF
+genrule(
+ name = "invoke_tool",
+ srcs = ["@bazel_tools//tools/osx:xcode-locator"],
+ outs = ["xcode_locations"],
+ cmd = "\$< -v > \$@",
+)
+EOF
+
+ bazel build xcodehelper:xcode_locations
+ XCODE_INFO=$(cat bazel-genfiles/xcodehelper/xcode_locations | grep -m1 7)
XCODE_DIR=$(echo $XCODE_INFO | cut -d ':' -f3)
XCODE_VERSION=$(echo $XCODE_INFO | cut -d ':' -f1)
IOS_SDK_VERSION=$(DEVELOPER_DIR=$XCODE_DIR xcodebuild -sdk -version \
diff --git a/src/test/shell/bazel/bazel_objc_test.sh b/src/test/shell/bazel/bazel_objc_test.sh
index 5a80672c55..125392cb00 100755
--- a/src/test/shell/bazel/bazel_objc_test.sh
+++ b/src/test/shell/bazel/bazel_objc_test.sh
@@ -168,7 +168,7 @@ function test_xcodelocator_embedded_tool() {
cat >ios/BUILD <<EOF
genrule(
name = "invoke_tool",
- srcs = ["@bazel_tools//tools/objc:xcode-locator"],
+ srcs = ["@bazel_tools//tools/osx:xcode-locator"],
outs = ["tool_output"],
cmd = "\$< > \$@",
tags = ["requires-darwin"],