Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase timeouts for macOS toolchain setup #17519

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/cpp/osx_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _compile_cc_file_single_arch(repository_ctx, src_name, out_name):
"-o",
out_name,
src_name,
], 60)
])
if (xcrun_result.return_code != 0):
error_msg = (
"return code {code}, stderr: {err}, stdout: {out}"
Expand Down Expand Up @@ -107,7 +107,7 @@ def _compile_cc_file(repository_ctx, src_name, out_name):
"-o",
out_name,
src_name,
], 60)
])

if xcrun_result.return_code == 0:
xcrun_result = repository_ctx.execute([
Expand All @@ -120,7 +120,7 @@ def _compile_cc_file(repository_ctx, src_name, out_name):
"--sign",
"-",
out_name,
], 60)
])
if xcrun_result.return_code != 0:
error_msg = (
"codesign return code {code}, stderr: {err}, stdout: {out}"
Expand Down
10 changes: 3 additions & 7 deletions tools/osx/xcode_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
installed on the local host.
"""

_EXECUTE_TIMEOUT = 120

def _search_string(fullstring, prefix, suffix):
"""Returns the substring between two given substrings of a larger string.

Expand Down Expand Up @@ -55,8 +53,7 @@ def _xcode_version_output(repository_ctx, name, version, aliases, developer_dir)
repository_ctx.report_progress("Fetching SDK information for Xcode %s" % version)
xcodebuild_result = repository_ctx.execute(
["xcrun", "xcodebuild", "-version", "-sdk"],
_EXECUTE_TIMEOUT,
{"DEVELOPER_DIR": developer_dir},
environment = {"DEVELOPER_DIR": developer_dir},
)
if (xcodebuild_result.return_code != 0):
error_msg = (
Expand Down Expand Up @@ -135,7 +132,7 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label):
"-o",
"xcode-locator-bin",
xcodeloc_src_path,
], _EXECUTE_TIMEOUT)
])

if (xcrun_result.return_code != 0):
suggestion = ""
Expand All @@ -156,7 +153,6 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label):
repository_ctx.report_progress("Running xcode-locator")
xcode_locator_result = repository_ctx.execute(
["./xcode-locator-bin", "-v"],
_EXECUTE_TIMEOUT,
)
if (xcode_locator_result.return_code != 0):
error_msg = (
Expand Down Expand Up @@ -195,7 +191,7 @@ def _darwin_build_file(repository_ctx):
"xcrun",
"xcodebuild",
"-version",
], _EXECUTE_TIMEOUT)
])

(toolchains, xcodeloc_err) = run_xcode_locator(
repository_ctx,
Expand Down