参考所有分组,完成尽量多的内容:收紧WASM smoke source-map边界守卫
This commit is contained in:
@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
|
|||||||
# LinuxCNC RS274 parameter/INI handling, M-code canon side effects, generated
|
# LinuxCNC RS274 parameter/INI handling, M-code canon side effects, generated
|
||||||
# switchkins/remap config cases, kinematics sources, and OPFS-only browser
|
# switchkins/remap config cases, kinematics sources, and OPFS-only browser
|
||||||
# persistence. It validates smoke-test source coverage only; it does not add
|
# persistence. It validates smoke-test source coverage only; it does not add
|
||||||
# CNC behavior or expand smoke parsing.
|
# CNC behavior, expand smoke parsing, or interpret G-code.
|
||||||
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
||||||
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
|
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
|
||||||
|
|
||||||
@@ -179,8 +179,18 @@ required_phrases = [
|
|||||||
"OPFS workspace/policy/directory handling",
|
"OPFS workspace/policy/directory handling",
|
||||||
'unlinking `filename + ".bak"`',
|
'unlinking `filename + ".bak"`',
|
||||||
"./check-linuxcnc-wasm-smoke-source-map.sh",
|
"./check-linuxcnc-wasm-smoke-source-map.sh",
|
||||||
|
"does not interpret G-code",
|
||||||
]
|
]
|
||||||
for phrase in required_phrases:
|
for phrase in required_phrases:
|
||||||
if phrase not in source_map:
|
if phrase not in source_map:
|
||||||
raise SystemExit(f"docs/linuxcnc-wasm-smoke-source-map.md missing boundary phrase: {phrase}")
|
raise SystemExit(f"docs/linuxcnc-wasm-smoke-source-map.md missing boundary phrase: {phrase}")
|
||||||
|
|
||||||
|
for entry in [
|
||||||
|
"test-native.sh",
|
||||||
|
"test-linuxcnc-source-link.sh",
|
||||||
|
"build-wasm.sh",
|
||||||
|
]:
|
||||||
|
text = Path(entry).read_text(encoding="utf-8")
|
||||||
|
if "./check-linuxcnc-wasm-smoke-source-map.sh" not in text:
|
||||||
|
raise SystemExit(f"{entry} must run ./check-linuxcnc-wasm-smoke-source-map.sh")
|
||||||
PY
|
PY
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ OPFS-only is the required boundary.
|
|||||||
restore/save failure handling, and browser app OPFS reload coverage.
|
restore/save failure handling, and browser app OPFS reload coverage.
|
||||||
- Smoke wrappers must keep positive minimum coverage thresholds so accidental
|
- Smoke wrappers must keep positive minimum coverage thresholds so accidental
|
||||||
section loss is visible.
|
section loss is visible.
|
||||||
|
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
|
||||||
|
run `./check-linuxcnc-wasm-smoke-source-map.sh` before consuming Node/browser
|
||||||
|
WASM smoke coverage or browser artifacts.
|
||||||
|
- The WASM smoke source-map guard validates LinuxCNC source-backed smoke
|
||||||
|
coverage only; it does not interpret G-code.
|
||||||
|
|
||||||
## Checks
|
## Checks
|
||||||
|
|
||||||
@@ -64,6 +69,7 @@ Run:
|
|||||||
./check-linuxcnc-wasm-smoke-source-map.sh
|
./check-linuxcnc-wasm-smoke-source-map.sh
|
||||||
./test-native.sh
|
./test-native.sh
|
||||||
./test-linuxcnc-source-link.sh
|
./test-linuxcnc-source-link.sh
|
||||||
|
./build-wasm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
`check-linuxcnc-wasm-smoke-source-map.sh` keeps this document, LinuxCNC source
|
`check-linuxcnc-wasm-smoke-source-map.sh` keeps this document, LinuxCNC source
|
||||||
|
|||||||
Reference in New Issue
Block a user