AtlatestRepositorysigil-http3

sigil-http3 / tree / scriptsphantom-echo-check.sh

1#!/usr/bin/env bash
2set -euo pipefail
3cd "$(dirname "$0")/.."
4mkdir -p build .deps
5echo_result_path="$PWD/build/echo-result.txt"
6echo_test_path="$PWD/build/echo-tests.log"
7echo_native_path="$PWD/build/echo-native.log"
8record_result() {
9 local job_rc=$?
10 printf 'RESULT echo-job rc=%s\n' "$job_rc" | tee -a "$echo_result_path"
12trap record_result EXIT
13bash scripts/prepare-nat-dependency.sh
14test ! -e .deps/sigil-quic
15bash scripts/prepare-quic.sh
16test "$(git -C .deps/sigil-quic rev-parse HEAD)" = "$(cat quic.rev)"
17printf 'RESULT source-pin=%s\n' "$(cat quic.rev)" | tee "$echo_result_path"
18if [ "${HTTP3_ECHO_REGRESSION:-0}" = 1 ]; then
19 timeout --foreground 180 sigil deps install
20 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.log
21 printf 'RESULT echo-shared-regression=PASS\n' | tee -a "$echo_result_path"
22fi
23cd tools/interop
24timeout --foreground 180 sigil deps install
25timeout --foreground 240 sigil test test/test-profile.sgl test/test-echo.sgl test/test-echo-integration.sgl 2>&1 | tee "$echo_test_path"
26printf 'RESULT echo-handler-tests=PASS\n' | tee -a "$echo_result_path"
27timeout --foreground 240 sigil build --config native 2>&1 | tee "$echo_native_path"
28printf 'RESULT echo-native-build=PASS\n' | tee -a "$echo_result_path"
29if [ "${HTTP3_ECHO_BROWSER:-0}" = 1 ]; then
30 cd ../..
31 HTTP3_PREFLIGHT_PREBUILT=1 bash scripts/phantom-browser-preflight.sh
32 printf 'RESULT echo-browser-probe=PASS require-echo=%s\n' "${HTTP3_PREFLIGHT_REQUIRE_ECHO:-1}" | tee -a "$echo_result_path"
33fi