参考所有分组,完成尽量多的内容:收紧构建入口 source-map 守卫

结论:未扩展 smoke 功能行为,仅把 build-policy guard 扩展为同时校验 test-native.sh、test-linuxcnc-source-link.sh、build-wasm.sh 运行同一组 source-map guards。

LinuxCNC 来源依据:src/emc/rs274ngc/Submakefile、src/emc/tooldata/Submakefile、src/emc/ini/Submakefile、src/emc/pythonplugin/Submakefile、src/emc/kinematics/Submakefile 与 kinematics.h 的构建/源码链接边界。

检查通过:./check-linuxcnc-build-source-map.sh;./check-linuxcnc-workstreams-source-map.sh;./test-native.sh;./test-linuxcnc-source-link.sh。
This commit is contained in:
cnc
2026-06-05 06:12:59 +08:00
parent 7f45abe93c
commit ba2d576f8b
2 changed files with 22 additions and 14 deletions

View File

@@ -40,21 +40,28 @@ grep -F 'Default WASM manifest partition must remain 26 wasm-safe `core` sources
docs/linuxcnc-build-source-map.md >/dev/null
grep -F '`build-wasm.sh` must configure with `CNC_SIM_ENABLE_SMOKE_BACKEND=OFF`' \
docs/linuxcnc-build-source-map.md >/dev/null
grep -F '`build-wasm.sh` must run the same source-map guards as native and source-link' \
grep -F '`test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must' \
docs/linuxcnc-build-source-map.md >/dev/null
grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-rs274-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-kinematics-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-opfs-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-switchkins-remap-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-smoke-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-build-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-browser-app-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-workstreams-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-tooldata-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-shims-source-map.sh' build-wasm.sh >/dev/null
grep -F './check-linuxcnc-wasm-blockers-source-map.sh' build-wasm.sh >/dev/null
source_map_guards=(
'./check-linuxcnc-rs274-source-map.sh'
'./check-linuxcnc-kinematics-source-map.sh'
'./check-linuxcnc-opfs-source-map.sh'
'./check-linuxcnc-switchkins-remap-source-map.sh'
'./check-linuxcnc-wasm-smoke-source-map.sh'
'./check-linuxcnc-build-source-map.sh'
'./check-linuxcnc-browser-app-source-map.sh'
'./check-linuxcnc-workstreams-source-map.sh'
'./check-linuxcnc-tooldata-source-map.sh'
'./check-linuxcnc-wasm-shims-source-map.sh'
'./check-linuxcnc-wasm-blockers-source-map.sh'
)
for guarded_entry in test-native.sh test-linuxcnc-source-link.sh build-wasm.sh; do
for source_map_guard in "${source_map_guards[@]}"; do
grep -F "$source_map_guard" "$guarded_entry" >/dev/null
done
done
grep -F 'manifest_core_count=$(count_nonempty_lines "$manifest_core_output")' build-wasm.sh >/dev/null
grep -F 'manifest_blocked_count=$(count_nonempty_lines "$manifest_blocked_output")' build-wasm.sh >/dev/null
grep -F 'manifest_core_count" -ne 26 || "$manifest_blocked_count" -ne 9' build-wasm.sh >/dev/null

View File

@@ -41,8 +41,9 @@ behavior and must not expand the temporary smoke parser.
`CONFIGURE_RULE_VERSION` fields instead of hashing whole scripts.
- `build-wasm.sh` must configure with `CNC_SIM_ENABLE_SMOKE_BACKEND=OFF` and
`CNC_SIM_ENABLE_LINUXCNC_WASM_SAFE_PROBE=ON`.
- `build-wasm.sh` must run the same source-map guards as native and source-link
entry points before consuming generated config aliases or browser artifacts.
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
run the same source-map guards before consuming generated config aliases,
source-linked LinuxCNC objects, or browser artifacts.
- `build-wasm.sh` must build `cnc_sim_wasm_runtime_probe` before
`cnc_sim_wasm`, copy `cnc_sim.js` and `cnc_sim.wasm` exactly once, compare
copied artifacts with `cmp -s`, and run Node smoke before browser smoke.