AtlatestRepositorysigil-http3
sigil-http3 / tree / scriptsphantom-echo-check.sh
1
#!/usr/bin/env bash2
set -euo pipefail3
cd "$(dirname "$0")/.."4
mkdir -p build .deps5
echo_result_path="$PWD/build/echo-result.txt"6
echo_test_path="$PWD/build/echo-tests.log"7
echo_native_path="$PWD/build/echo-native.log"8
record_result() {9
local job_rc=$?10
printf 'RESULT echo-job rc=%s\n' "$job_rc" | tee -a "$echo_result_path"11
}12
trap record_result EXIT13
bash scripts/prepare-nat-dependency.sh14
test ! -e .deps/sigil-quic15
bash scripts/prepare-quic.sh16
test "$(git -C .deps/sigil-quic rev-parse HEAD)" = "$(cat quic.rev)"17
printf 'RESULT source-pin=%s\n' "$(cat quic.rev)" | tee "$echo_result_path"18
if [ "${HTTP3_ECHO_REGRESSION:-0}" = 1 ]; then19
timeout --foreground 180 sigil deps install20
timeout --foreground 240 sigil test test/test-frame.sgl test/test-qpack.sgl test/test-streams.sgl test/test-control.sgl test/test-request.sgl test/test-connection.sgl test/test-webtransport-wire.sgl test/test-webtransport-session.sgl test/test-webtransport-router.sgl 2>&1 | tee build/echo-regression.log21
printf 'RESULT echo-shared-regression=PASS\n' | tee -a "$echo_result_path"22
fi23
cd tools/interop24
timeout --foreground 180 sigil deps install25
timeout --foreground 240 sigil test test/test-profile.sgl test/test-echo.sgl test/test-echo-integration.sgl 2>&1 | tee "$echo_test_path"26
printf 'RESULT echo-handler-tests=PASS\n' | tee -a "$echo_result_path"27
timeout --foreground 240 sigil build --config native 2>&1 | tee "$echo_native_path"28
printf 'RESULT echo-native-build=PASS\n' | tee -a "$echo_result_path"29
if [ "${HTTP3_ECHO_BROWSER:-0}" = 1 ]; then30
cd ../..31
HTTP3_PREFLIGHT_PREBUILT=1 bash scripts/phantom-browser-preflight.sh32
printf 'RESULT echo-browser-probe=PASS require-echo=%s\n' "${HTTP3_PREFLIGHT_REQUIRE_ECHO:-1}" | tee -a "$echo_result_path"33
fi