参考所有分组,完成尽量多的内容:结论为 porting 文档守住 LinuxCNC fixture 覆盖

This commit is contained in:
cnc
2026-06-03 23:07:37 +08:00
parent 802e85cd63
commit 52d7a49861
2 changed files with 12 additions and 0 deletions

View File

@@ -223,3 +223,7 @@ This matrix tracks LinuxCNC feature coverage for the web/WASM simulator. A featu
| Block/item reader validation | LinuxCNC native/source errors covered for repeated `$`, block-delete execution skipping, unused `D/$/E/H/I/J/K/L/P/Q/R` words, bad item-start characters, middle-of-line or comment-prefixed `N` words, comment-prefixed or midline `O` words, top-level or midline bracket items, naked top-level numbers, non-leading ATAN argument slashes, malformed leading `N` numbers, EOF/program-end file checks, unclosed/nested parenthesis comments, commented or mid-program `%` characters, overlong file lines, too many M-codes, fractional/extended N-word sequence numbers, `close_and_downcase()` case/whitespace normalization, and percent-file termination from `interp_read.cc`, `interp_internal.cc`, `rs274ngc_pre.cc`, `interp_array.cc`, and `interp_check.cc` | `tests/gcode/linuxcnc_block_delete.ngc`, `tests/gcode/linuxcnc_multiple_spindle_choice_words_error.ngc`, `tests/gcode/linuxcnc_d_word_no_use_error.ngc`, `tests/gcode/linuxcnc_spindle_dollar_no_use_error.ngc`, `tests/gcode/linuxcnc_e_word_no_use_error.ngc`, `tests/gcode/linuxcnc_h_word_no_use_error.ngc`, `tests/gcode/linuxcnc_i_word_no_use_error.ngc`, `tests/gcode/linuxcnc_j_word_no_use_error.ngc`, `tests/gcode/linuxcnc_k_word_no_use_error.ngc`, `tests/gcode/linuxcnc_l_word_no_use_error.ngc`, `tests/gcode/linuxcnc_p_word_no_use_error.ngc`, `tests/gcode/linuxcnc_q_word_no_use_error.ngc`, `tests/gcode/linuxcnc_r_word_no_use_error.ngc`, `tests/gcode/linuxcnc_bad_character_bang_error.ngc`, `tests/gcode/linuxcnc_commented_percent_error.ngc`, `tests/gcode/linuxcnc_mid_program_percent_error.ngc`, `tests/gcode/linuxcnc_bad_character_middle_n_word_error.ngc`, `tests/gcode/linuxcnc_comment_prefixed_n_word_error.ngc`, `tests/gcode/linuxcnc_comment_prefixed_spaced_n_word_error.ngc`, `tests/gcode/linuxcnc_comment_prefixed_oword_error.ngc`, `tests/gcode/linuxcnc_midline_numeric_oword_error.ngc`, `tests/gcode/linuxcnc_midline_named_oword_error.ngc`, `tests/gcode/linuxcnc_bad_character_top_left_bracket_error.ngc`, `tests/gcode/linuxcnc_bad_character_top_right_bracket_error.ngc`, `tests/gcode/linuxcnc_bad_character_midline_left_bracket_error.ngc`, `tests/gcode/linuxcnc_bad_character_midline_right_bracket_error.ngc`, `tests/gcode/linuxcnc_bad_character_top_number_error.ngc`, `tests/gcode/linuxcnc_top_level_bare_atan_error.ngc`, `tests/gcode/linuxcnc_midline_bare_atan_error.ngc`, `tests/gcode/linuxcnc_bad_n_number_format_error.ngc`, `tests/gcode/linuxcnc_file_ended_no_program_end_error.ngc`, `tests/gcode/linuxcnc_file_ended_no_percent_error.ngc`, `tests/gcode/linuxcnc_unclosed_comment_error.ngc`, `tests/gcode/linuxcnc_nested_comment_error.ngc`, generated `linuxcnc_command_too_long_error.ngc`, `tests/gcode/linuxcnc_too_many_m_codes_error.ngc`, `tests/gcode/linuxcnc_fractional_linenumbers.ngc`, `tests/gcode/linuxcnc_extended_linenumbers.ngc`, `tests/gcode/linuxcnc_close_and_downcase_words.ngc`, `tests/gcode/linuxcnc_percent_file_ignores_trailing.ngc` |
| Broader canned cycles `G73`, `G74`, `G82`-`G89` | covered for representative LinuxCNC native/source `G73`, `G74`, `G82`, `G83`, `G84`, `G85`, `G86`, `G87`, `G88`, and `G89` sequences from `interp_cycles.cc`, including peck drilling, feed-out boring, stop/restart boring, dwell/feed-out boring, special non-XY `G74/G84` tapping argument order, and `G87` plane-specific `I/J/K` mapping; smoke parser still maps supported cycles across `G17/G18/G19` | `tests/gcode/linuxcnc_canned_cycles_extended.ngc`, `tests/gcode/linuxcnc_canned_cycle_planes.ngc`, smoke API regression |
| Full source-level wasm build | covered for the current wasm-safe RS274 source set, with remaining work focused on broadening browser-hostile dependency replacement and feature coverage | `./build-wasm.sh`, `test-linuxcnc-wasm-runtime-link.sh`, `test-web-wasm-node-smoke.sh`, `test-web-wasm-browser-smoke.sh` |
## Fixture Coverage Audit
The following LinuxCNC fixtures are also covered by both the native `librs274` runner and the source-link runner. They remain listed here so fixture coverage cannot drift out of the porting matrix: `tests/gcode/linuxcnc_abort_hot_comment.ngc`, `tests/gcode/linuxcnc_comments.ngc`, `tests/gcode/linuxcnc_g10_invalid_l_error.ngc`, `tests/gcode/linuxcnc_g10_l10_p_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_l11_p_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc`, `tests/gcode/linuxcnc_g10_l1_p_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc`, `tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc`, `tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_l1_without_offsets_error.ngc`, `tests/gcode/linuxcnc_g10_l20_i_word_error.ngc`, `tests/gcode/linuxcnc_g10_l20_p_missing_error.ngc`, `tests/gcode/linuxcnc_g10_l20_p_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_l20_r_word_error.ngc`, `tests/gcode/linuxcnc_g10_l2_i_word_error.ngc`, `tests/gcode/linuxcnc_g10_l2_p_missing_error.ngc`, `tests/gcode/linuxcnc_g10_l2_p_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g10_p_non_integer_error.ngc`, `tests/gcode/linuxcnc_g4_arc_p_conflict_error.ngc`, `tests/gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc`, `tests/gcode/linuxcnc_g52_missing_y_control_point_error.ngc`, `tests/gcode/linuxcnc_g52_noninteger_l_error.ngc`, `tests/gcode/linuxcnc_g52_nonpositive_p_error.ngc`, `tests/gcode/linuxcnc_g52_p_without_xy_after_start_error.ngc`, `tests/gcode/linuxcnc_g52_zero_feed_error.ngc`, `tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc`, `tests/gcode/linuxcnc_g53_short_control_points_error.ngc`, `tests/gcode/linuxcnc_g53_without_g52_error.ngc`, `tests/gcode/linuxcnc_g62_k_non_integer_error.ngc`, `tests/gcode/linuxcnc_g62_missing_p_order_error.ngc`, `tests/gcode/linuxcnc_g62_missing_q_mode_error.ngc`, `tests/gcode/linuxcnc_g62_p_non_integer_error.ngc`, `tests/gcode/linuxcnc_g62_q_non_integer_error.ngc`, `tests/gcode/linuxcnc_g62_q_out_of_range_error.ngc`, `tests/gcode/linuxcnc_g62_zero_feed_error.ngc`, `tests/gcode/linuxcnc_indexed_parameters.ngc`, `tests/gcode/linuxcnc_ini_named_parameter.ngc`, `tests/gcode/linuxcnc_modal_invalidate.ngc`, `tests/gcode/linuxcnc_named_parameter_exists.ngc`, `tests/gcode/linuxcnc_named_parameter_normalization.ngc`, `tests/gcode/linuxcnc_polar_g28_error.ngc`, `tests/gcode/linuxcnc_polar_g30_error.ngc`, `tests/gcode/linuxcnc_readonly_named_parameter_assign_error.ngc`, `tests/gcode/linuxcnc_same_modal_control_mode_error.ngc`, `tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc`, `tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc`, `tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc`, `tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc`, `tests/gcode/linuxcnc_same_modal_predefined_position_error.ngc`, `tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc`, and `tests/gcode/linuxcnc_same_modal_threading_motion_error.ngc`.

View File

@@ -809,6 +809,14 @@ for label, script in [
f"{label} regression script no longer covers LinuxCNC fixtures: "
+ ", ".join(missing)
)
porting_doc = Path("docs/linuxcnc-porting.md").read_text(encoding="utf-8")
missing_doc = [f"tests/gcode/{fixture}.ngc" for fixture in fixtures if f"tests/gcode/{fixture}.ngc" not in porting_doc]
if missing_doc:
raise SystemExit(
"LinuxCNC fixture coverage is missing from docs/linuxcnc-porting.md: "
+ ", ".join(missing_doc)
)
PY
for script in \