test: add parallels windows smoke harness

This commit is contained in:
Peter Steinberger
2026-03-14 00:33:12 +00:00
parent 767609532f
commit 4dbab064f0
4 changed files with 856 additions and 0 deletions

View File

@@ -371,6 +371,7 @@ verify_version_contains() {
pack_main_tgz() {
say "Pack current main tgz"
ensure_current_build
local short_head pkg
short_head="$(git rev-parse --short HEAD)"
pkg="$(
@@ -383,6 +384,32 @@ pack_main_tgz() {
tar -xOf "$MAIN_TGZ_PATH" package/dist/build-info.json
}
current_build_commit() {
python3 - <<'PY'
import json
import pathlib
path = pathlib.Path("dist/build-info.json")
if not path.exists():
print("")
else:
print(json.loads(path.read_text()).get("commit", ""))
PY
}
ensure_current_build() {
local head build_commit
head="$(git rev-parse HEAD)"
build_commit="$(current_build_commit)"
if [[ "$build_commit" == "$head" ]]; then
return
fi
say "Build dist for current head"
pnpm build
build_commit="$(current_build_commit)"
[[ "$build_commit" == "$head" ]] || die "dist/build-info.json still does not match HEAD after build"
}
start_server() {
local host_ip="$1"
say "Serve current main tgz on $host_ip:$HOST_PORT"