WAI toolchain decision 11: joule-moq-relay builds wai-relay, joule-moq-room wai-room, and joule-moq-ingest wai-ingest. wai dev finds them by those names (WAI_RELAY_BIN, WAI_ROOM_BIN), and the quickstart archive, the release workflow, the examples' workflow, the browser tests, the interop scripts, the example host script, the Scoop manifest and the crates' READMEs and example configurations name them so. Wire and record identifiers that carry a crate's name (joule-moq-relay/session-summary/2, joule-moq-ingest/session/1, the relay's MOQT implementation string) and the log variables (JOULE_MOQ_*_LOG) are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
37 lines
1.7 KiB
Shell
Executable file
37 lines
1.7 KiB
Shell
Executable file
#!/bin/bash
|
|
# Other implementations' interop test clients against joule-moq-relay on this host.
|
|
# scripts/clients.sh <target-dir> <out-dir> <label>=<client binary> ...
|
|
# Each client speaks the interop runner's test-client interface (--relay, --test,
|
|
# --tls-disable-verify; TAP 14 on stdout). Every client runs its whole suite over raw
|
|
# QUIC and over WebTransport against a relay on loopback with a development
|
|
# certificate; each run's TAP and log go to <out-dir> (VERBOSE=1 asks the clients for
|
|
# their debug logs). No network beyond loopback.
|
|
set -u
|
|
T=$1
|
|
OUT=$2
|
|
shift 2
|
|
mkdir -p "$OUT"
|
|
JOULE_MOQ_RELAY_LOG=debug "$T/debug/wai-relay" --dev > "$OUT/relay.log" 2>&1 &
|
|
R=$!
|
|
# The relay is gone before this script is: a next run binds the same port.
|
|
trap 'kill $R 2>/dev/null; wait $R 2>/dev/null' EXIT
|
|
sleep 1
|
|
if ! kill -0 $R 2>/dev/null; then
|
|
echo "the relay did not start:"; tail -3 "$OUT/relay.log"; exit 1
|
|
fi
|
|
# A run that hangs is ended after five minutes (no coreutils timeout on every host).
|
|
limit() { perl -e 'alarm shift; exec @ARGV or die "$ARGV[0]: $!"' "$@"; }
|
|
rc=0
|
|
for spec in "$@"; do
|
|
label=${spec%%=*}
|
|
bin=${spec#*=}
|
|
for url in moqt://127.0.0.1:4443/moq https://127.0.0.1:4443/moq; do
|
|
case $url in moqt:*) tr=quic ;; *) tr=webtransport ;; esac
|
|
limit 300 "$bin" --relay "$url" --tls-disable-verify ${VERBOSE:+--verbose} > "$OUT/${label}_${tr}.tap" 2> "$OUT/${label}_${tr}.log"
|
|
code=$?
|
|
[ $code -eq 0 ] || rc=1
|
|
summary=$(grep -E '^(ok|not ok) ' "$OUT/${label}_${tr}.tap" | sed -E 's/^(ok|not ok) [0-9]+ - ([^ ]+)( # SKIP.*)?$/\2=\1\3/' | sed -E 's/=not ok/=FAIL/; s/# SKIP.*/skip/' | tr '\n' ' ')
|
|
echo "${label} ${tr}: exit ${code} ${summary}"
|
|
done
|
|
done
|
|
exit $rc
|