From 42bf1b0da60ba0a4a882b7eeb8bb283735be95f8 Mon Sep 17 00:00:00 2001 From: Clack Cole Date: Wed, 7 May 2025 15:50:24 -0600 Subject: [PATCH] fix: Use DEFAULT_EXECUTE_TIMEOUT for swiftpm build and test actions These timeouts were hardcoded instead of using the argument value, which prevented the argument from having an effect. --- project.py | 4 ++-- project_precommit_check | 2 +- reproduce.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/project.py b/project.py index f8030b5f..53484614 100644 --- a/project.py +++ b/project.py @@ -352,7 +352,7 @@ def build_swift_package(path, swiftc, swift_version, configuration, if added_swift_flags is not None: for flag in added_swift_flags.split(): command += ["-Xswiftc", flag] - return common.check_execute(command, timeout=3600, + return common.check_execute(command, timeout=common.DEFAULT_EXECUTE_TIMEOUT, sandbox_profile=sandbox_profile, stdout=stdout, stderr=stderr, env=env) @@ -377,7 +377,7 @@ def test_swift_package(path, swiftc, sandbox_profile, if (swift_branch not in ['swift-3.0-branch', 'swift-3.1-branch']): command.insert(2, '--disable-sandbox') - return common.check_execute(command, timeout=3600, + return common.check_execute(command, timeout=common.DEFAULT_EXECUTE_TIMEOUT, sandbox_profile=sandbox_profile, stdout=stdout, stderr=stderr, env=env) diff --git a/project_precommit_check b/project_precommit_check index 5b53b111..c5405522 100755 --- a/project_precommit_check +++ b/project_precommit_check @@ -237,7 +237,7 @@ def check(project, swift_branch, swiftc, compatibility_version): ] common.debug_print("--- Executing build actions ---") try: - common.check_execute(runner_command, timeout=3600) + common.check_execute(runner_command, timeout=common.DEFAULT_EXECUTE_TIMEOUT) except common.ExecuteCommandFailure: common.debug_print("--- Encountered failures. Check .log files in current directory for details ---") return 1 diff --git a/reproduce.py b/reproduce.py index 1f8220a8..ba309739 100755 --- a/reproduce.py +++ b/reproduce.py @@ -112,7 +112,7 @@ def main(): run_command += ['--skip-clone'] if args.assertions: run_command += ['--assertions'] - common.check_execute(run_command, timeout=3600) + common.check_execute(run_command, timeout=common.DEFAULT_EXECUTE_TIMEOUT) # Build specified indexed project. Otherwise, build all indexed projects runner_command = [