Skip to content

The agent that grows with you

test(install): give install.ps1 subprocess tests the stage budget their siblings use

kshitijk4poor18d125cc1bd9
diff --git a/tests/scripts/install/test_install_ps1_json_failure_frame.py b/tests/scripts/install/test_install_ps1_json_failure_frame.py
index 220f18b8137..53dc33bd7ef 100644
--- a/tests/scripts/install/test_install_ps1_json_failure_frame.py
+++ b/tests/scripts/install/test_install_ps1_json_failure_frame.py
@@ -24,11 +24,11 @@ def test_fail_inside_a_stage_emits_one_json_frame_with_the_reason(tmp_path):
result = subprocess.run(
[powershell, "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", str(INSTALLER),
"-Stage", "repository", "-Json", "-InstallDir", str(install_dir)],
- env=env, capture_output=True, text=True, timeout=30)
+ env=env, capture_output=True, text=True, timeout=240)
frames = [json.loads(line) for line in result.stdout.splitlines() if line.startswith("{")]
assert result.returncode == 1
assert len(frames) == 1, result.stdout
assert frames[0]["ok"] is False and frames[0]["stage"] == "repository"
assert "exists and is not a Hermes git checkout" in frames[0]["reason"]
- assert (install_dir / "user-file").read_text(encoding="utf-8") == "preserve me"
+ assert (install_dir / "user-file").read_text(encoding="utf-8-sig") == "preserve me"
assert not tools.exists()
diff --git a/tests/scripts/install/test_install_ps1_staged_git.py b/tests/scripts/install/test_install_ps1_staged_git.py
index d839fd078ac..4cbafc4fabb 100644
--- a/tests/scripts/install/test_install_ps1_staged_git.py
+++ b/tests/scripts/install/test_install_ps1_staged_git.py
@@ -61,5 +61,5 @@ def test_stage_processes_restore_pinned_git_and_never_fall_back(tmp_path):
"$script:GitPinFiles.Remove(('win32-' + (Get-WindowsArch))); "
"if (Ensure-Git) { exit 1 } else { exit 0 }")
refused = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass",
- "-Command", probe], env=env, capture_output=True, text=True, timeout=30)
+ "-Command", probe], env=env, capture_output=True, text=True, timeout=240)
assert refused.returncode == 0, refused.stdout + refused.stderr