diff --git a/tests/check.sh b/tests/check.sh index 2b6682e..c6d413f 100755 --- a/tests/check.sh +++ b/tests/check.sh @@ -69,12 +69,12 @@ docker run --rm --entrypoint sh "$image" -c ' probe() { local platform="$1" threshold="$2" output count - output="$(docker run --rm \ - --volume "$PWD/tests/font-probe.html:/tmp/font-probe.html:ro" \ - --entrypoint /opt/chromium/chrome "$image" \ - --no-sandbox --headless=new --disable-gpu --disable-dev-shm-usage \ - --fingerprint=1000 --fingerprint-platform="$platform" \ - --dump-dom "file:///tmp/font-probe.html#$platform" 2>/dev/null)" + output="$(docker run --rm -i --entrypoint sh "$image" -c ' + cat >/tmp/font-probe.html + exec /opt/chromium/chrome --no-sandbox --headless=new --disable-gpu --disable-dev-shm-usage \ + --fingerprint=1000 --fingerprint-platform="$1" \ + --dump-dom "file:///tmp/font-probe.html#$1" + ' sh "$platform" /dev/null)" count="$(sed -n 's/.*data-count="\([0-9][0-9]*\)".*/\1/p' <<<"$output")" [[ "$count" =~ ^[0-9]+$ && "$count" -ge "$threshold" ]] || { printf '%s font probe: expected >= %s, got %s\n' "$platform" "$threshold" "${count:-none}" >&2