AtlatestRepositorysigil-nat

sigil-nat / tree / scriptsphantom-nat-probe-check.sh

1#!/usr/bin/env bash
2set -euo pipefail
3cd "$(dirname "$0")/.."
4mkdir -p build/nat-probe
5result_path="$PWD/build/nat-probe/check-result.txt"
6record_result() {
7 local job_rc=$?
8 printf 'RESULT nat-probe-check rc=%s\n' "$job_rc" | tee -a "$result_path"
9}
10trap record_result EXIT
11printf 'RESULT operation=probe-fixtures-plus-real-loopback-UDP no-outside-network\n' | tee "$result_path"
12command -v perl > build/nat-probe/perl-path.txt
13perl -c tools/nat/reflectors/nat-probe.pl 2>&1 | tee build/nat-probe/perl-syntax.log
14node --check scripts/nat-probe.mjs
15timeout --foreground 30 node --test tools/nat/test-nat-probe.mjs tools/nat/test-nat-probe-runtime.mjs tools/nat/test-nat-probe-perl.mjs 2>&1 | tee build/nat-probe/tests.log
16printf 'RESULT nat-probe-fixtures=PASS\n' | tee -a "$result_path"