AtlatestRepositorysigil-nat
1
#!/usr/bin/env bash2
set -euo pipefail3
cd "$(dirname "$0")/.."4
mkdir -p build/nat5
result="$PWD/build/nat/check-result.txt"6
record_result() {7
local job_rc=$?8
printf 'RESULT sigil-nat-check rc=%s\n' "$job_rc" | tee -a "$result"9
}10
trap record_result EXIT11
printf 'RESULT operation=offline-tests-plus-read-only-inspection mapping-requests=0\n' | tee "$result"12
timeout --foreground 30 node --test tools/nat/test-codecs.mjs tools/nat/test-upnp.mjs tools/nat/test-lease.mjs 2>&1 | tee build/nat/tests.log13
node --check tools/nat/external-udp-probe.mjs14
node --check tools/nat/external-udp-probe-from-receipt.mjs15
node --check scripts/phantom-upnp-mapping-check.mjs16
printf 'RESULT offline-tests=PASS\n' | tee -a "$result"17
timeout --foreground 30 node scripts/phantom-nat-inspect.mjs | tee build/nat/inspection.log18
printf 'RESULT read-only-inspection=COMPLETE mapping-requests=0\n' | tee -a "$result"