结论:新增独立 wasm-port 工作区,修复 native probes include 路径,最小解释器 harness 已可验证 G0 直线快速、G1 进给和 SET_FEED_RATE canonical event。检查:git diff --check 通过;wasm-port/tests/native/verify_native_probes.sh 通过。
46 lines
1.3 KiB
Bash
Executable File
46 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
BUILD_DIR="$ROOT_DIR/build/native"
|
|
|
|
"$ROOT_DIR/tools/build_native_probes.sh"
|
|
|
|
check_exitcode() {
|
|
local name="$1"
|
|
local file="$BUILD_DIR/$name.exitcode"
|
|
|
|
if [[ ! -f "$file" ]]; then
|
|
echo "missing exitcode: $file" >&2
|
|
exit 1
|
|
fi
|
|
|
|
local rc
|
|
rc="$(tr -d '[:space:]' < "$file")"
|
|
if [[ "$rc" != "0" ]]; then
|
|
echo "$name failed with exit code $rc" >&2
|
|
if [[ -f "$BUILD_DIR/$name.stderr.log" ]]; then
|
|
sed -n '1,160p' "$BUILD_DIR/$name.stderr.log" >&2
|
|
fi
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
check_exitcode linuxcnc_interp_state_probe
|
|
check_exitcode linuxcnc_namedparam_harness
|
|
check_exitcode linuxcnc_interp_minimal_harness
|
|
check_exitcode linuxcnc_interp_minimal_harness.run
|
|
check_exitcode linuxcnc_rs274_compile_probe
|
|
|
|
RUN_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.run.stdout.log"
|
|
|
|
grep -Fq "read=0" "$RUN_STDOUT"
|
|
grep -Fq "execute=0" "$RUN_STDOUT"
|
|
grep -Fq "execute_feed=0" "$RUN_STDOUT"
|
|
grep -Fq "parse_line=0" "$RUN_STDOUT"
|
|
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=0 x=1 y=2 z=0" "$RUN_STDOUT"
|
|
grep -Fq "canon_event=SET_FEED_RATE rate=120" "$RUN_STDOUT"
|
|
grep -Fq "canon_event=STRAIGHT_FEED line=0 x=3 y=4 z=0" "$RUN_STDOUT"
|
|
|
|
echo "native probe validation complete"
|