参考所有分组:补 native 参数持久化和 threading 覆盖,测试通过
This commit is contained in:
@@ -208,7 +208,7 @@ This matrix tracks LinuxCNC feature coverage for the web/WASM simulator. A featu
|
|||||||
| Override controls `M48`-`M53` | covered with Canon feed override, spindle speed override, adaptive feed, and feed hold callbacks preserved as temporary state events | `tests/gcode/linuxcnc_override_controls.ngc` |
|
| Override controls `M48`-`M53` | covered with Canon feed override, spindle speed override, adaptive feed, and feed hold callbacks preserved as temporary state events | `tests/gcode/linuxcnc_override_controls.ngc` |
|
||||||
| Modal state save/restore `M70`-`M73` | covered for main-program save/invalidate/restore plus O-word subroutine autorestore in smoke parser, with native/source regressions checking restored distance mode, units, and XY plane motion | `tests/gcode/linuxcnc_modal_state.ngc`, `tests/gcode/linuxcnc_modal_autorestore.ngc` |
|
| Modal state save/restore `M70`-`M73` | covered for main-program save/invalidate/restore plus O-word subroutine autorestore in smoke parser, with native/source regressions checking restored distance mode, units, and XY plane motion | `tests/gcode/linuxcnc_modal_state.ngc`, `tests/gcode/linuxcnc_modal_autorestore.ngc` |
|
||||||
| LinuxCNC read-only named parameters | common modal/unit/feed/spindle reads and additional ccomp/spindle-mode readonly reads are covered through LinuxCNC native/source backends | `tests/gcode/linuxcnc_readonly_named_parameters.ngc`, `tests/gcode/linuxcnc_readonly_named_parameters_extra.ngc`, `tests/gcode/linuxcnc_lathe_diameter_mode.ngc` |
|
| LinuxCNC read-only named parameters | common modal/unit/feed/spindle reads and additional ccomp/spindle-mode readonly reads are covered through LinuxCNC native/source backends | `tests/gcode/linuxcnc_readonly_named_parameters.ngc`, `tests/gcode/linuxcnc_readonly_named_parameters_extra.ngc`, `tests/gcode/linuxcnc_lathe_diameter_mode.ngc` |
|
||||||
| LinuxCNC numbered parameters | native/source coverage checks readonly numbered-parameter rejection plus probe, tool, G28/G30, G52/G92, G5X/G59.3, debug/M66 result, tool-offset, and current-position numbered parameters from LinuxCNC source state | `tests/gcode/linuxcnc_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_probe_numbered_parameters.ngc`, `tests/gcode/linuxcnc_multi_rotary_probe_numbered_parameters.ngc`, `tests/gcode/linuxcnc_tool_info_zero_parameter.ngc`, `tests/gcode/linuxcnc_spindle_tool_info_parameter.ngc`, `tests/gcode/linuxcnc_readonly_numbered_parameter_assign_error.ngc`, `tests/gcode/linuxcnc_g28_g30_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_g28_g30_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g92_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_g92_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g52_g92_numbered_interaction.ngc`, `tests/gcode/linuxcnc_g5x_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g59_3_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g59_3_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g5x_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g54_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_debug_level_parameter.ngc`, `tests/gcode/linuxcnc_m66_result_parameter.ngc`, `tests/gcode/linuxcnc_tool_offset_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_tool_offset_numbered_parameters.ngc`, `tests/gcode/linuxcnc_current_position_numbered_parameters.ngc` |
|
| LinuxCNC numbered parameters | native/source coverage checks readonly numbered-parameter rejection plus probe, tool, G28/G30, G52/G92, G5X/G59.3, debug/M66 result, tool-offset, current-position, `restore_parameters()`/`save_parameters()` persistence, and volatile global numbered parameters from LinuxCNC source state | `tests/gcode/linuxcnc_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_probe_numbered_parameters.ngc`, `tests/gcode/linuxcnc_multi_rotary_probe_numbered_parameters.ngc`, `tests/gcode/linuxcnc_tool_info_zero_parameter.ngc`, `tests/gcode/linuxcnc_spindle_tool_info_parameter.ngc`, `tests/gcode/linuxcnc_readonly_numbered_parameter_assign_error.ngc`, `tests/gcode/linuxcnc_g28_g30_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_g28_g30_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g92_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_g92_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g52_g92_numbered_interaction.ngc`, `tests/gcode/linuxcnc_g5x_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g59_3_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g59_3_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g5x_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_g54_rotary_numbered_parameters.ngc`, `tests/gcode/linuxcnc_debug_level_parameter.ngc`, `tests/gcode/linuxcnc_m66_result_parameter.ngc`, `tests/gcode/linuxcnc_tool_offset_numbered_parameters.ngc`, `tests/gcode/linuxcnc_rotary_tool_offset_numbered_parameters.ngc`, `tests/gcode/linuxcnc_current_position_numbered_parameters.ngc`, `tests/gcode/linuxcnc_persistent_parameters_set.ngc`, `tests/gcode/linuxcnc_persistent_parameters_check.ngc`, `tests/gcode/linuxcnc_rotary_persistent_parameters_set.ngc`, `tests/gcode/linuxcnc_rotary_persistent_parameters_check.ngc`, `tests/gcode/linuxcnc_g54_persistent_parameters_set.ngc`, `tests/gcode/linuxcnc_g54_persistent_parameters_check.ngc`, `tests/gcode/linuxcnc_user_persistent_parameter_set.ngc`, `tests/gcode/linuxcnc_user_persistent_parameter_check.ngc`, `tests/gcode/linuxcnc_user_persistent_parameter_existing_check.ngc`, `tests/gcode/linuxcnc_user_persistent_parameter_boundary_set.ngc`, `tests/gcode/linuxcnc_user_persistent_parameter_boundary_check.ngc`, `tests/gcode/linuxcnc_volatile_global_parameter_set.ngc`, `tests/gcode/linuxcnc_volatile_global_parameter_check.ngc` |
|
||||||
| Feed and motion control modes `G93/G94/G95`, `G61/G61.1/G64` | covered through LinuxCNC native/source backends | `tests/gcode/linuxcnc_feed_modes.ngc`, `tests/gcode/linuxcnc_motion_modes.ngc` |
|
| Feed and motion control modes `G93/G94/G95`, `G61/G61.1/G64` | covered through LinuxCNC native/source backends | `tests/gcode/linuxcnc_feed_modes.ngc`, `tests/gcode/linuxcnc_motion_modes.ngc` |
|
||||||
| Canned cycle `G73`-`G89`/`G80` | covered for drilling expand-to-canon path, `G18/G19` plane-specific depth-axis mapping for representative drilling/boring cycles, `G17.1` extended-plane depth/retract mapping, and native/source LinuxCNC `interp_cycles.cc` validation of repeat counts, required R/depth words, invalid rotary axes including follow-up modal-cycle blocks, Q/P words, and spindle state | `tests/gcode/linuxcnc_canned_cycle.ngc`, `tests/gcode/linuxcnc_canned_cycles_extended.ngc`, `tests/gcode/linuxcnc_canned_cycle_planes.ngc`, `tests/gcode/linuxcnc_extended_plane_cycle.ngc`, `tests/gcode/linuxcnc_canned_cycle_l0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_missing_r_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_missing_z_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g18_missing_y_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g19_missing_x_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_r_less_z_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g18_r_less_y_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g19_r_less_x_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_u_in_xy_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_a_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_b_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_c_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_reject_rotary_followup.ngc`, `tests/gcode/linuxcnc_canned_cycle_g73_missing_q_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g83_missing_q_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g73_q0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g83_q0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g82_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g86_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g88_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g89_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g74_clockwise_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g84_counterclockwise_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g74_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g84_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g86_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g88_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_k_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_i_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_j_error.ngc` |
|
| Canned cycle `G73`-`G89`/`G80` | covered for drilling expand-to-canon path, `G18/G19` plane-specific depth-axis mapping for representative drilling/boring cycles, `G17.1` extended-plane depth/retract mapping, and native/source LinuxCNC `interp_cycles.cc` validation of repeat counts, required R/depth words, invalid rotary axes including follow-up modal-cycle blocks, Q/P words, and spindle state | `tests/gcode/linuxcnc_canned_cycle.ngc`, `tests/gcode/linuxcnc_canned_cycles_extended.ngc`, `tests/gcode/linuxcnc_canned_cycle_planes.ngc`, `tests/gcode/linuxcnc_extended_plane_cycle.ngc`, `tests/gcode/linuxcnc_canned_cycle_l0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_missing_r_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_missing_z_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g18_missing_y_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g19_missing_x_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_r_less_z_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g18_r_less_y_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g19_r_less_x_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_u_in_xy_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_a_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_b_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_c_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_reject_rotary_followup.ngc`, `tests/gcode/linuxcnc_canned_cycle_g73_missing_q_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g83_missing_q_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g73_q0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g83_q0_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g82_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g86_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g88_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g89_missing_p_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g74_clockwise_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g84_counterclockwise_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g74_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g84_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g86_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g88_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_stopped_spindle_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_k_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_i_error.ngc`, `tests/gcode/linuxcnc_canned_cycle_g87_missing_j_error.ngc` |
|
||||||
| Coordinate offset Canon events `G10 L2`, `G10 L20`, `G10 P0 active-system targeting`, `G54`-`G59.3` selection, `G52`, `G92/G92.1/G92.2/G92.3` | covered through LinuxCNC native/source backends, including all nine G5X indices | `tests/gcode/linuxcnc_coordinate_offsets.ngc`, `tests/gcode/linuxcnc_coordinate_l20.ngc`, `tests/gcode/linuxcnc_coordinate_p0.ngc`, `tests/gcode/linuxcnc_coordinate_select_all.ngc`, `tests/gcode/linuxcnc_g92_restore.ngc`, `tests/gcode/linuxcnc_g52_offset.ngc` |
|
| Coordinate offset Canon events `G10 L2`, `G10 L20`, `G10 P0 active-system targeting`, `G54`-`G59.3` selection, `G52`, `G92/G92.1/G92.2/G92.3` | covered through LinuxCNC native/source backends, including all nine G5X indices | `tests/gcode/linuxcnc_coordinate_offsets.ngc`, `tests/gcode/linuxcnc_coordinate_l20.ngc`, `tests/gcode/linuxcnc_coordinate_p0.ngc`, `tests/gcode/linuxcnc_coordinate_select_all.ngc`, `tests/gcode/linuxcnc_g92_restore.ngc`, `tests/gcode/linuxcnc_g52_offset.ngc` |
|
||||||
|
|||||||
@@ -451,6 +451,33 @@ for case in "${threading_check_error_cases[@]}"; do
|
|||||||
fi
|
fi
|
||||||
grep -Fq "$expected" "$output_dir/cnc_sim_linuxcnc_$fixture.err"
|
grep -Fq "$expected" "$output_dir/cnc_sim_linuxcnc_$fixture.err"
|
||||||
done
|
done
|
||||||
|
# Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc
|
||||||
|
# convert_straight() and convert_threading_cycle() reject invalid
|
||||||
|
# spindle state/selector, rotary-axis motion, and G76 I/J/K geometry
|
||||||
|
# before issuing synchronized threading motion.
|
||||||
|
threading_convert_error_cases=(
|
||||||
|
"linuxcnc_g33_stopped_spindle_error|Spindle not turning in G33"
|
||||||
|
"linuxcnc_g33_1_stopped_spindle_error|Spindle not turning in G33.1"
|
||||||
|
"linuxcnc_g33_spindle_dollar_out_of_range_error|Invalid spindle (\$) number in G33 move"
|
||||||
|
"linuxcnc_g33_1_spindle_dollar_out_of_range_error|Invalid spindle (\$) number in G33.1 move"
|
||||||
|
"linuxcnc_g76_spindle_dollar_out_of_range_error|Invalid D-number in G76 cycle"
|
||||||
|
"linuxcnc_g76_stopped_spindle_error|Chosen spindle (0) not turning in G76"
|
||||||
|
"linuxcnc_g76_rotary_axis_error|Cannot move rotary axes with G76"
|
||||||
|
"linuxcnc_g76_i_zero_error|In G76, I must not be 0"
|
||||||
|
"linuxcnc_g76_j_zero_error|In G76, J must be greater than 0"
|
||||||
|
"linuxcnc_g76_k_less_equal_j_error|In G76, K must be greater than J"
|
||||||
|
)
|
||||||
|
for case in "${threading_convert_error_cases[@]}"; do
|
||||||
|
fixture=${case%%|*}
|
||||||
|
expected=${case#*|}
|
||||||
|
if CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||||
|
"$build_dir/linuxcnc_rs274_dump" "tests/gcode/$fixture.ngc" \
|
||||||
|
>"$output_dir/cnc_sim_linuxcnc_$fixture.json" 2>"$output_dir/cnc_sim_linuxcnc_$fixture.err"; then
|
||||||
|
echo "expected $fixture.ngc to fail" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
grep -Fq "$expected" "$output_dir/cnc_sim_linuxcnc_$fixture.err"
|
||||||
|
done
|
||||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_threading_sync.ngc >"$output_dir/cnc_sim_linuxcnc_threading_sync.json"
|
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_threading_sync.ngc >"$output_dir/cnc_sim_linuxcnc_threading_sync.json"
|
||||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_threading_cycle.ngc >"$output_dir/cnc_sim_linuxcnc_threading_cycle.json"
|
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_threading_cycle.ngc >"$output_dir/cnc_sim_linuxcnc_threading_cycle.json"
|
||||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc
|
# Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc
|
||||||
@@ -787,6 +814,34 @@ CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs2
|
|||||||
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_rotary_tool_offset_numbered_parameters.ngc >"$output_dir/cnc_sim_linuxcnc_rotary_tool_offset_numbered_parameters.json"
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_rotary_tool_offset_numbered_parameters.ngc >"$output_dir/cnc_sim_linuxcnc_rotary_tool_offset_numbered_parameters.json"
|
||||||
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_current_position_numbered_parameters.ngc >"$output_dir/cnc_sim_linuxcnc_current_position_numbered_parameters.json"
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_current_position_numbered_parameters.ngc >"$output_dir/cnc_sim_linuxcnc_current_position_numbered_parameters.json"
|
||||||
cp "$base_var_file" "$var_file"
|
cp "$base_var_file" "$var_file"
|
||||||
|
# Source basis: LinuxCNC src/emc/rs274ngc/rs274ngc_pre.cc
|
||||||
|
# restore_parameters() loads only persisted system/user parameters and
|
||||||
|
# save_parameters() writes required and changed persistent ranges.
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_persistent_parameters_set.ngc >"$output_dir/cnc_sim_linuxcnc_persistent_parameters_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_persistent_parameters_check.ngc >"$output_dir/cnc_sim_linuxcnc_persistent_parameters_check.json"
|
||||||
|
rotary_persistent_var_file="$build_dir/rs274ngc-rotary-persistent.var"
|
||||||
|
: > "$rotary_persistent_var_file"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$rotary_persistent_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_rotary_persistent_parameters_set.ngc >"$output_dir/cnc_sim_linuxcnc_rotary_persistent_parameters_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$rotary_persistent_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_rotary_persistent_parameters_check.ngc >"$output_dir/cnc_sim_linuxcnc_rotary_persistent_parameters_check.json"
|
||||||
|
g54_persistent_var_file="$build_dir/rs274ngc-g54-persistent.var"
|
||||||
|
: > "$g54_persistent_var_file"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$g54_persistent_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_g54_persistent_parameters_set.ngc >"$output_dir/cnc_sim_linuxcnc_g54_persistent_parameters_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$g54_persistent_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_g54_persistent_parameters_check.ngc >"$output_dir/cnc_sim_linuxcnc_g54_persistent_parameters_check.json"
|
||||||
|
empty_var_file="$build_dir/rs274ngc-empty.var"
|
||||||
|
: > "$empty_var_file"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$empty_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_set.ngc >"$output_dir/cnc_sim_linuxcnc_user_persistent_parameter_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$empty_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_check.ngc >"$output_dir/cnc_sim_linuxcnc_user_persistent_parameter_check.json"
|
||||||
|
existing_user_var_file="$build_dir/rs274ngc-existing-user.var"
|
||||||
|
printf '5001\t17.000000\n' > "$existing_user_var_file"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$existing_user_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_set.ngc >"$output_dir/cnc_sim_linuxcnc_user_existing_persistent_parameter_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$existing_user_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_existing_check.ngc >"$output_dir/cnc_sim_linuxcnc_user_existing_persistent_parameter_check.json"
|
||||||
|
boundary_user_var_file="$build_dir/rs274ngc-boundary-user.var"
|
||||||
|
printf '5001\t17.000000\n5030\t18.000000\n5060\t19.000000\n' > "$boundary_user_var_file"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$boundary_user_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_boundary_set.ngc >"$output_dir/cnc_sim_linuxcnc_user_persistent_parameter_boundary_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$boundary_user_var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_user_persistent_parameter_boundary_check.ngc >"$output_dir/cnc_sim_linuxcnc_user_persistent_parameter_boundary_check.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_volatile_global_parameter_set.ngc >"$output_dir/cnc_sim_linuxcnc_volatile_global_parameter_set.json"
|
||||||
|
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_volatile_global_parameter_check.ngc >"$output_dir/cnc_sim_linuxcnc_volatile_global_parameter_check.json"
|
||||||
|
cp "$base_var_file" "$var_file"
|
||||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc
|
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc
|
||||||
# read_parameter_setting(), read_parameter(), read_real_value(),
|
# read_parameter_setting(), read_parameter(), read_real_value(),
|
||||||
# read_atan(), read_unary(), and read_operation() reject malformed
|
# read_atan(), read_unary(), and read_operation() reject malformed
|
||||||
@@ -2369,6 +2424,69 @@ if not any(
|
|||||||
):
|
):
|
||||||
raise SystemExit("missing LinuxCNC numbered current-position parameter branch motion")
|
raise SystemExit("missing LinuxCNC numbered current-position parameter branch motion")
|
||||||
|
|
||||||
|
persistent_parameters_check = load("cnc_sim_linuxcnc_persistent_parameters_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 5 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in persistent_parameters_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC persistent parameter reload branch motion")
|
||||||
|
|
||||||
|
rotary_persistent_parameters_check = load("cnc_sim_linuxcnc_rotary_persistent_parameters_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 5 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in rotary_persistent_parameters_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC rotary persistent parameter reload branch motion")
|
||||||
|
|
||||||
|
g54_persistent_parameters_check = load("cnc_sim_linuxcnc_g54_persistent_parameters_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 4 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in g54_persistent_parameters_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC G54 persistent parameter reload branch motion")
|
||||||
|
|
||||||
|
user_persistent_parameter_check = load("cnc_sim_linuxcnc_user_persistent_parameter_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 3 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in user_persistent_parameter_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC empty-var #5001 non-persistence branch motion")
|
||||||
|
|
||||||
|
user_existing_persistent_parameter_check = load("cnc_sim_linuxcnc_user_existing_persistent_parameter_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 3 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in user_existing_persistent_parameter_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC existing-var #5001 persistence branch motion")
|
||||||
|
|
||||||
|
user_persistent_parameter_boundary_check = load("cnc_sim_linuxcnc_user_persistent_parameter_boundary_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 3 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in user_persistent_parameter_boundary_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC #5000/#5001/#5030/#5060 persistence boundary branch motion")
|
||||||
|
|
||||||
|
volatile_global_parameter_check = load("cnc_sim_linuxcnc_volatile_global_parameter_check.json")
|
||||||
|
if not any(
|
||||||
|
event["type"] == "linear-feed" and
|
||||||
|
event["line"] == 3 and
|
||||||
|
event["end"]["x"] == 1
|
||||||
|
for event in volatile_global_parameter_check
|
||||||
|
):
|
||||||
|
raise SystemExit("missing LinuxCNC volatile global #31 reset branch motion")
|
||||||
|
|
||||||
coords = load("cnc_sim_linuxcnc_coordinate_offsets.json")
|
coords = load("cnc_sim_linuxcnc_coordinate_offsets.json")
|
||||||
g5x = [event for event in coords if event["type"] == "set-g5x-offset"]
|
g5x = [event for event in coords if event["type"] == "set-g5x-offset"]
|
||||||
g92 = [event for event in coords if event["type"] == "set-g92-offset"]
|
g92 = [event for event in coords if event["type"] == "set-g92-offset"]
|
||||||
@@ -2578,6 +2696,20 @@ echo "dumped $output_dir/cnc_sim_linuxcnc_m66_result_parameter.json"
|
|||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_tool_offset_numbered_parameters.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_tool_offset_numbered_parameters.json"
|
||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_rotary_tool_offset_numbered_parameters.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_rotary_tool_offset_numbered_parameters.json"
|
||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_current_position_numbered_parameters.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_current_position_numbered_parameters.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_persistent_parameters_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_persistent_parameters_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_rotary_persistent_parameters_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_rotary_persistent_parameters_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_g54_persistent_parameters_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_g54_persistent_parameters_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_persistent_parameter_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_persistent_parameter_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_existing_persistent_parameter_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_existing_persistent_parameter_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_persistent_parameter_boundary_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_user_persistent_parameter_boundary_check.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_volatile_global_parameter_set.json"
|
||||||
|
echo "dumped $output_dir/cnc_sim_linuxcnc_volatile_global_parameter_check.json"
|
||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_offsets.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_offsets.json"
|
||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_l20.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_l20.json"
|
||||||
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_p0.json"
|
echo "dumped $output_dir/cnc_sim_linuxcnc_coordinate_p0.json"
|
||||||
|
|||||||
Reference in New Issue
Block a user