Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51745/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51743/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51744/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51748/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51749/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51747/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51746/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"project": "Sample/Sample.csproj",
"testProject": "Sample.Tests/Sample.Tests.csproj",
"warnings": { "total": 0, "byCode": {} },
"e2eHealthUrl": "http://127.0.0.1:51742/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"testProject": "Sample.Tests/Sample.Tests.csproj",
"warnings": { "total": 0, "byCode": {} },
"mutationScore": null,
"e2eHealthUrl": "http://127.0.0.1:51737/",
"updated": "2026-08-14T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51750/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51751/",
"e2eHealthUrl": "http://127.0.0.1:1/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"project": "Sample/Sample.csproj",
"testProject": "Sample.Tests/Sample.Tests.csproj",
"warnings": { "total": 0, "byCode": {} },
"e2eHealthUrl": "http://127.0.0.1:51739/",
"e2eHealthUrl": "http://127.0.0.1:1/",
"updated": "2026-08-18T00:00:00Z"
}
37 changes: 25 additions & 12 deletions scripts/quality-gate/fixtures/run-fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ run_fixture() {
target="$work$(jq -r '.target // "" | if . == "" then "" else "/" + . end' "$exp")"
run_log="$work/.run.log"

point_at_stand_in "$fx" "$target"
bl="$target/.gate-baseline.json"
bl_before="$(cat "$bl" 2>/dev/null || echo __ABSENT__)"

Expand Down Expand Up @@ -129,31 +130,43 @@ run_into_results() {

dotnet nuget locals global-packages --list >/dev/null 2>&1 || true

supabase_stand_in_url() {
local fx="$1" tree
for tree in overlay base; do
jq -r '.e2eHealthUrl // empty' "$fx/$tree/.gate-baseline.json" 2>/dev/null
done | head -n1
}

STAND_INS="$RUNROOT/.stand-ins"
STAND_IN_PIDS=()
start_supabase_stand_ins() {
local fx url hp host port waited
local fx name waited port
mkdir -p "$STAND_INS"
for fx in "${fixtures[@]}"; do
[[ "$(jq -r '.needsSupabase // false' "$fx/expect.json" 2>/dev/null)" == "true" ]] || continue
command -v python3 >/dev/null || { echo "python3 is required by $(basename "$fx")" >&2; exit 3; }
url="$(supabase_stand_in_url "$fx")"; hp="${url#*://}"; hp="${hp%%/*}"; host="${hp%%:*}"; port="${hp##*:}"
python3 -m http.server "$port" --bind "$host" >/dev/null 2>&1 &
name="$(basename "$fx")"
python3 -c '
import http.server, os, sys
server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), http.server.SimpleHTTPRequestHandler)
with open(sys.argv[1] + ".tmp", "w") as f:
f.write(str(server.server_address[1]))
os.rename(sys.argv[1] + ".tmp", sys.argv[1])
server.serve_forever()
' "$STAND_INS/$name.port" >"$STAND_INS/$name.log" 2>&1 &
STAND_IN_PIDS+=($!)
disown
waited=0
until (exec 3<>"/dev/tcp/$host/$port") 2>/dev/null; do
until [[ -s "$STAND_INS/$name.port" ]] && port="$(cat "$STAND_INS/$name.port")" && (exec 3<>"/dev/tcp/127.0.0.1/$port") 2>/dev/null; do
sleep 0.1; waited=$((waited + 1))
[[ $waited -lt 300 ]] || { echo "the Supabase stand-in for $(basename "$fx") on $host:$port didn't start" >&2; exit 3; }
if [[ $waited -ge 300 ]]; then
echo "the Supabase stand-in for $name didn't start; its output:" >&2
sed 's/^/ /' "$STAND_INS/$name.log" >&2
exit 3
fi
done
done
}

point_at_stand_in() {
local port_file="$STAND_INS/$(basename "$1").port" baseline="$2/.gate-baseline.json"
[[ -f "$port_file" ]] || return 0
jq --arg url "http://127.0.0.1:$(cat "$port_file")/" '.e2eHealthUrl = $url' "$baseline" > "$baseline.tmp" && mv "$baseline.tmp" "$baseline"
}

stop_supabase_stand_ins() { local pid; for pid in ${STAND_IN_PIDS[@]+"${STAND_IN_PIDS[@]}"}; do kill "$pid" 2>/dev/null; done; }

start_supabase_stand_ins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51756/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51754/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51753/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51752/",
"updated": "2026-11-30T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"total": 0,
"byCode": {}
},
"e2eHealthUrl": "http://127.0.0.1:51755/",
"updated": "2026-11-30T00:00:00Z"
}
Loading