#!/usr/bin/env bash # Read "issue package test" rows. Only an observed failure of that exact test # proves the reproduction still runs; a missing/skipped test is not a fix. set -uo pipefail ok=1 while read -r issue pkg test; do [ -n "$issue" ] || continue out="out-${test}.txt" status=0 go test -v -count=1 -run "^${test}\$" "$pkg" >"$out" 2>&1 || status=$? if [ "$status" -ne 0 ] && grep -q "^--- FAIL: ${test} (" "$out"; then echo "${test} (${issue}) still fails, as expected" elif [ "$status" = 0 ] && grep -q "^--- PASS: ${test} (" "$out"; then echo "::error::${test} (${pkg}) now PASSES: ${issue} looks fixed, remove its skip" ok=0 else echo "::error::${test} (${pkg}) did not run to a verdict or failed to build (exit ${status}):" tail -20 "$out" ok=0 fi done [ "$ok" = 1 ]