From 7557648b9e7c8f3da5bd452c1a94ee58d93c696f Mon Sep 17 00:00:00 2001 From: David Ahmann Date: Tue, 3 Mar 2026 16:26:56 -0500 Subject: [PATCH] test: enforce exact brew version match in UAT --- scripts/test_uat_local.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/test_uat_local.sh b/scripts/test_uat_local.sh index 58331b0..829b1c2 100755 --- a/scripts/test_uat_local.sh +++ b/scripts/test_uat_local.sh @@ -332,7 +332,16 @@ run_brew_install_path_suite() { fi expected_version="${release_version#v}" - run_step "brew_expected_version" bash -lc "\"${brew_bin}\" --version | grep -F \"${expected_version}\"" + run_step "brew_expected_version" python3 -c 'import re, subprocess, sys +bin_path, expected = sys.argv[1], sys.argv[2] +out = subprocess.check_output([bin_path, "--version"], text=True) +match = re.search(r"\b(\d+\.\d+\.\d+)\b", out) +actual = match.group(1) if match else "" +missing = "" +if actual != expected: + print(f"expected brew binary version {expected}, got {actual or missing} from: {out.strip()}", file=sys.stderr) + raise SystemExit(1) +' "${brew_bin}" "${expected_version}" run_binary_contract_suite "brew" "${brew_bin}" "${artifacts_dir}" }