diff options
Diffstat (limited to 'src/test/shell')
-rw-r--r-- | src/test/shell/bazel/BUILD | 2 | ||||
-rwxr-xr-x | src/test/shell/bazel/bazel_apple_test.sh | 15 | ||||
-rwxr-xr-x | src/test/shell/bazel/bazel_objc_test.sh | 2 |
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"], |