按规划持续工作
This commit is contained in:
@@ -8,12 +8,59 @@ CANON_FIXTURE_DIR="$ROOT_DIR/tests/fixtures/canon"
|
||||
GCODE_ERROR_FIXTURE_DIR="$ROOT_DIR/tests/fixtures/gcode_errors"
|
||||
CANON_ERROR_FIXTURE_DIR="$ROOT_DIR/tests/fixtures/canon_errors"
|
||||
NAMEDPARAM_INI_FIXTURE="$ROOT_DIR/tests/fixtures/ini/namedparams.ini"
|
||||
SPINDLE_ORIENT_OFFSET_INI_FIXTURE="$ROOT_DIR/tests/fixtures/ini/spindle_orient_offset.ini"
|
||||
DISABLE_FANUC_STYLE_SUB_INI_FIXTURE="$ROOT_DIR/tests/fixtures/ini/disable_fanuc_style_sub.ini"
|
||||
VALIDATION_CACHE_KEY_FILE="$BUILD_DIR/native-probe-validation.input.sha256"
|
||||
VALIDATION_CACHE_OK_FILE="$BUILD_DIR/native-probe-validation.ok"
|
||||
|
||||
"$ROOT_DIR/tools/verify_upstream_baseline.sh"
|
||||
"$ROOT_DIR/tools/verify_vendor_sync.sh"
|
||||
"$ROOT_DIR/tools/verify_no_standalone_cnc_semantics.sh"
|
||||
"$ROOT_DIR/tools/verify_native_linuxcnc_fixture_baseline.sh"
|
||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||
"$ROOT_DIR/tests/native/verify_sim_configs.sh"
|
||||
"$ROOT_DIR/tests/native/verify_nc_files.sh"
|
||||
|
||||
hash_tree() {
|
||||
find "$@" -type f -print0 | sort -z | xargs -0 -r sha256sum
|
||||
}
|
||||
|
||||
hash_build_validation_inputs() {
|
||||
find "$BUILD_DIR" -maxdepth 1 -type f \
|
||||
\( \
|
||||
-name '*.exitcode' \
|
||||
-o -name '*.run.stdout.log' \
|
||||
-o -name '*.run.stderr.log' \
|
||||
-o -name 'source-probes.tsv' \
|
||||
-o -name 'native-probes.ok' \
|
||||
-o -name 'linuxcnc_interp_minimal_harness' \
|
||||
\) \
|
||||
! -name 'native-probe-validation.*' \
|
||||
-print0 | sort -z | xargs -0 -r sha256sum
|
||||
}
|
||||
|
||||
native_probe_validation_fingerprint() {
|
||||
{
|
||||
sha256sum \
|
||||
"$ROOT_DIR/tests/native/verify_native_probes.sh" \
|
||||
"$ROOT_DIR/tools/source-manifest.txt"
|
||||
hash_tree \
|
||||
"$GCODE_FIXTURE_DIR" \
|
||||
"$CANON_FIXTURE_DIR" \
|
||||
"$GCODE_ERROR_FIXTURE_DIR" \
|
||||
"$CANON_ERROR_FIXTURE_DIR" \
|
||||
"$ROOT_DIR/tests/fixtures/ini"
|
||||
hash_build_validation_inputs
|
||||
} | sha256sum | awk '{ print $1 }'
|
||||
}
|
||||
|
||||
NATIVE_PROBE_VALIDATION_FINGERPRINT="$(native_probe_validation_fingerprint)"
|
||||
if [[ -f "$VALIDATION_CACHE_KEY_FILE" && -f "$VALIDATION_CACHE_OK_FILE" ]] &&
|
||||
[[ "$(tr -d '[:space:]' < "$VALIDATION_CACHE_KEY_FILE")" == "$NATIVE_PROBE_VALIDATION_FINGERPRINT" ]] &&
|
||||
[[ "$(tr -d '[:space:]' < "$VALIDATION_CACHE_OK_FILE")" == "$NATIVE_PROBE_VALIDATION_FINGERPRINT" ]]; then
|
||||
echo "native probe validation up to date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
check_source_probe_coverage() {
|
||||
local manifest_sources="$BUILD_DIR/source-manifest-sources.sorted"
|
||||
@@ -155,6 +202,40 @@ check_exitcode linuxcnc_namedparam_harness
|
||||
check_exitcode linuxcnc_namedparam_harness.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness
|
||||
check_exitcode linuxcnc_interp_minimal_harness.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.do_while_break.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.oword_bug315.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.oword_bug315_p2.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.interp_exists.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.return_value.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.subs_follow_main.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.fractional_linenumbers.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.namedparam_bug424.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.g6164.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.rotation_abs_pts.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.rotation_g28.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.rotation_g53.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.iniparam.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.iniparam_failassign.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sub_call_from_sub.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sequence_number.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.nested_sub_error.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.nested_sub_in_file_error.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.oword_unwind.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.abort_hot_comment.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m19.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.magic_comments_param_format.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_01_basics.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_02_variables.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_07_nested_subs.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_08_sub_follows_main.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_10_m98_p001.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_13_named_program_named.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_13_named_program_numbered.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.m98m99_14_o_expression_call.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sim_axis_foam.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sim_bridgemill.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sim_geometry_xyzc.run
|
||||
check_exitcode linuxcnc_interp_minimal_harness.sim_external_offsets_dyn.run
|
||||
check_exitcode linuxcnc_parameter_file_harness
|
||||
check_exitcode linuxcnc_parameter_file_harness.run
|
||||
check_exitcode linuxcnc_interp_init_harness
|
||||
@@ -165,6 +246,8 @@ check_exitcode linuxcnc_remap_hal_sync_harness
|
||||
check_exitcode linuxcnc_remap_hal_sync_harness.run
|
||||
check_exitcode linuxcnc_5axis_remap_execute_harness
|
||||
check_exitcode linuxcnc_5axis_remap_execute_harness.run
|
||||
check_exitcode linuxcnc_duplicate_oword_remap_harness
|
||||
check_exitcode linuxcnc_duplicate_oword_remap_harness.run
|
||||
check_exitcode linuxcnc_indexer_harness
|
||||
check_exitcode linuxcnc_indexer_harness.run
|
||||
check_exitcode linuxcnc_rs274_compile_probe
|
||||
@@ -214,6 +297,29 @@ check_exitcode linuxcnc_interp_base_source_probe
|
||||
check_exitcode linuxcnc_gomath_source_probe
|
||||
check_exitcode linuxcnc_tooldata_common_source_probe
|
||||
|
||||
INIPARAM_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.iniparam.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$INIPARAM_STDOUT"
|
||||
grep -Fq "file_read_count=9" "$INIPARAM_STDOUT"
|
||||
grep -Fq "file_execute_count=8" "$INIPARAM_STDOUT"
|
||||
grep -Fq "file_saw_error=1" "$INIPARAM_STDOUT"
|
||||
grep -Fq "file_error_text=Named parameter #<_ini[nosuchsection]nosuchname> not defined" "$INIPARAM_STDOUT"
|
||||
grep -Fq "setup.current_x=10" "$INIPARAM_STDOUT"
|
||||
grep -Fq "setup.current_y=20" "$INIPARAM_STDOUT"
|
||||
grep -Fq "setup.current_z=30" "$INIPARAM_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=1 x=10 y=20 z=30" "$INIPARAM_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: position now: 10.000000 20.000000 30.000000" "$INIPARAM_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: not in INI: ######" "$INIPARAM_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$INIPARAM_STDOUT"
|
||||
|
||||
INIPARAM_FAILASSIGN_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.iniparam_failassign.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$INIPARAM_FAILASSIGN_STDOUT"
|
||||
grep -Fq "file_saw_error=1" "$INIPARAM_FAILASSIGN_STDOUT"
|
||||
grep -Fq "file_error_text=Cannot assign to read-only parameter #<_ini[vars]toolchange_x>" "$INIPARAM_FAILASSIGN_STDOUT"
|
||||
if grep -Fq "canon_event=MESSAGE: notreached" "$INIPARAM_FAILASSIGN_STDOUT"; then
|
||||
echo "iniparam-failassign unexpectedly reached post-assignment message" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
EMC_STATUS_STDOUT="$BUILD_DIR/linuxcnc_emc_status_probe.run.stdout.log"
|
||||
grep -Fq "emc_status_default_linear_units=1" "$EMC_STATUS_STDOUT"
|
||||
grep -Fq "emc_status_default_units_visible=1" "$EMC_STATUS_STDOUT"
|
||||
@@ -248,39 +354,56 @@ grep -Fq "xyzbc_trt_switch_mcodes_from_linuxcnc=1" "$FIVEAXIS_REMAP_ASSET_STDOUT
|
||||
grep -Fq "fiveaxis_remap_assets_from_linuxcnc=1" "$FIVEAXIS_REMAP_ASSET_STDOUT"
|
||||
|
||||
REMAP_PARSE_STDOUT="$BUILD_DIR/linuxcnc_remap_parse_harness.run.stdout.log"
|
||||
|
||||
check_remap_descriptor() {
|
||||
local machine="$1"
|
||||
local mcode="$2"
|
||||
|
||||
grep -Fq "${machine}_${mcode}_name_lookup=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "${machine}_${mcode}_mcode_lookup=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "${machine}_${mcode}_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "${machine}_${mcode}_modalgroup10=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "${machine}_${mcode}_no_python=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "${machine}_${mcode}_linuxcnc_mcode_remappable=1" "$REMAP_PARSE_STDOUT"
|
||||
}
|
||||
|
||||
grep -Fq "xyzac_trt_ini_open=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_parse_remap_1=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_parse_remap_2=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_parse_remap_3=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_parsed_remap_count=3" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_M428_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_M429_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_M430_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzac_trt_m_remapped_count=3" "$REMAP_PARSE_STDOUT"
|
||||
check_remap_descriptor "xyzac_trt" "M428"
|
||||
check_remap_descriptor "xyzac_trt" "M429"
|
||||
check_remap_descriptor "xyzac_trt" "M430"
|
||||
grep -Fq "xyzac_trt_linuxcnc_ngc_remaps_parsed=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_ini_open=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_parse_remap_1=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_parse_remap_2=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_parse_remap_3=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_parsed_remap_count=3" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_M428_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_M429_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_M430_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzbc_trt_m_remapped_count=3" "$REMAP_PARSE_STDOUT"
|
||||
check_remap_descriptor "xyzbc_trt" "M428"
|
||||
check_remap_descriptor "xyzbc_trt" "M429"
|
||||
check_remap_descriptor "xyzbc_trt" "M430"
|
||||
grep -Fq "xyzbc_trt_linuxcnc_ngc_remaps_parsed=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_ini_open=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_parse_remap_1=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_parse_remap_2=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_parsed_remap_count=2" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_M428_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_M429_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "xyzab_tdr_m_remapped_count=2" "$REMAP_PARSE_STDOUT"
|
||||
check_remap_descriptor "xyzab_tdr" "M428"
|
||||
check_remap_descriptor "xyzab_tdr" "M429"
|
||||
grep -Fq "xyzab_tdr_linuxcnc_ngc_remaps_parsed=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_ini_open=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_parse_remap_1=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_parse_remap_2=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_parse_remap_3=0" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_parsed_remap_count=3" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_M428_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_M429_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_M430_ngc=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "bridgemill_m_remapped_count=3" "$REMAP_PARSE_STDOUT"
|
||||
check_remap_descriptor "bridgemill" "M428"
|
||||
check_remap_descriptor "bridgemill" "M429"
|
||||
check_remap_descriptor "bridgemill" "M430"
|
||||
grep -Fq "bridgemill_linuxcnc_ngc_remaps_parsed=1" "$REMAP_PARSE_STDOUT"
|
||||
grep -Fq "fiveaxis_linuxcnc_remap_parse_path=1" "$REMAP_PARSE_STDOUT"
|
||||
|
||||
@@ -363,6 +486,14 @@ grep -Fq "xyzac_trt_xyzac_switchkins_test_1_file_final_rc=1" "$FIVEAXIS_REMAP_EX
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_1_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_1__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_1_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_open=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_read_count=120" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_execute_count=120" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_finish_count=3" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_final_rc=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_file_reached_exit=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2__hal[motion.switchkins-type]: rc=0 found=1 value=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_2_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_open=0" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_read_count=86" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "xyzac_trt_xyzac_switchkins_test_3_file_execute_count=86" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
@@ -413,6 +544,164 @@ grep -Fq "bridgemill_bridgemill_5axisgui__hal[motion.switchkins-type]: rc=0 foun
|
||||
grep -Fq "bridgemill_bridgemill_5axisgui_linuxcnc_demo_file_execute=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
grep -Fq "fiveaxis_linuxcnc_remap_execute_path=1" "$FIVEAXIS_REMAP_EXECUTE_STDOUT"
|
||||
|
||||
DUPLICATE_OWORD_REMAP_STDOUT="$BUILD_DIR/linuxcnc_duplicate_oword_remap_harness.run.stdout.log"
|
||||
grep -Fq "duplicate_oword_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_parse_remap_2=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_parsed_remap_count=2" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_remaps_ready=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_read_count=31" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_execute_count=31" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_finish_count=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_final_rc=3" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_file_reached_endfile=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_canon_event=MESSAGE: executing m207: run remapped m208 before o<problem>" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_canon_event=MESSAGE: rm207 running remapped m208" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_canon_event=MESSAGE: rm208 starting and done" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_canon_event=FINISH" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "duplicate_oword_linuxcnc_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_parsed_remap_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_file_saw_error=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_canon_event=MESSAGE: M400 call_level= 1.000000 remap_level=1.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_canon_event=MESSAGE: P word set: 47.110000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_canon_event=MESSAGE: Q word set: 8.150000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_0_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_file_execute_1=5" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_file_error_text=user-defined M400: missing: Q" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_file_saw_error=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_1_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_file_execute_1=5" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_file_error_text=user-defined M400: missing: P,Q" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_file_saw_error=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_args_2_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_file_read_5=5" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_file_error_text=Attempt to divide by zero" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_file_saw_error=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_canon_event=MESSAGE: before M400: call_level= 0.000000 remap_level=0.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_canon_event=MESSAGE: in rm400: call_level= 1.000000 remap_level=1.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_canon_event=MESSAGE: after failed M400: call_level= 0.000000 remap_level=0.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "fail_body_ngc_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_parsed_remap_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_remaps_ready=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_read_count=4" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_execute_count=4" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_finish_count=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_final_rc=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_file_reached_exit=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_canon_event=MESSAGE: m400 call_level=1.000000 remap_level=1.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "m30_interaction_linuxcnc_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_parse_remap_2=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_parse_remap_3=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_parse_remap_4=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_parsed_remap_count=4" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_remaps_ready=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_read_count=21" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_execute_count=21" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_finish_count=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_final_rc=3" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_file_reached_endfile=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: main call_level=0.000000 remap_level=0.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: m400 handler pre call_level=1.000000 remap_level=1.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: m401 handler pre call_level=2.000000 remap_level=2.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: m402 handler pre call_level=3.000000 remap_level=3.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: m403 handler pre call_level=4.000000 remap_level=4.000000 line=2.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=MESSAGE: m400 handler post call_level=1.000000 remap_level=1.000000 line=4.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_canon_event=FINISH" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "nested_remaps_oword_linuxcnc_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_parsed_remap_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_remaps_ready=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_read_count=19" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_execute_count=19" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_finish_count=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_final_rc=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_file_reached_exit=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_canon_event=MESSAGE: in rg881: n_args=3.000000 [1.000000] [2.000000] [3.000000] [0.000000] [0.000000]" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_canon_event=MESSAGE: in rg881: n_args=4.000000 [1.000000] [2.000000] [3.000000] [4.000000] [0.000000]" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_canon_event=MESSAGE: in rg881: n_args=4.000000 [1.000000] [2.000000] [3.000000] [5.000000] [0.000000]" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_canon_event=MESSAGE: in rg881: n_args=5.000000 [1.000000] [2.000000] [3.000000] [4.000000] [5.000000]" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "posargs_0_linuxcnc_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_2=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_3=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_4=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_5=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_6=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parse_remap_7=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_parsed_remap_count=7" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_remaps_ready=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_file_open=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_file_read_count=10084" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_file_execute_count=10084" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_file_final_rc=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_file_reached_exit=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=1.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=5.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=6.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=7.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=8.000000 - reset to 1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=8.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=9.000000" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=MESSAGE: seq=10.000000 - reset to 1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_canon_event=PROGRAM_END" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_linuxcnc_remap_file_execute=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "sequencing_linuxcnc_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_ini_open=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_subroutine_path_count=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_parse_remap_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_parse_remap_7=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_parsed_remap_count=7" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_mdi_M66 P1_execute_0=2" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_mdi_M66 P1_execute_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_mdi_M66 E1 L0_execute_0=2" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_mdi_M66 E1 L0_execute_1=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_parameter_5399=42.13" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_parameter_5399=-13.42" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=SET_MOTION_OUTPUT_BIT index=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=CLEAR_MOTION_OUTPUT_BIT index=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=SET_AUX_OUTPUT_BIT index=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=CLEAR_AUX_OUTPUT_BIT index=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=WAIT index=0 input_type=1 wait_type=0 timeout=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=WAIT index=0 input_type=0 wait_type=0 timeout=0" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=SET_MOTION_OUTPUT_VALUE index=0 value=42.13" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_canon_event=SET_AUX_OUTPUT_VALUE index=0 value=-13.42" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "remap_io_ngc_linuxcnc_mdi_sequence=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
grep -Fq "linuxcnc_upstream_remap_regression_path=1" "$DUPLICATE_OWORD_REMAP_STDOUT"
|
||||
|
||||
NAMEDPARAM_STDOUT="$BUILD_DIR/linuxcnc_namedparam_harness.run.stdout.log"
|
||||
grep -Fq "init_named_parameters=0" "$NAMEDPARAM_STDOUT"
|
||||
grep -Fq "global_named_count=57" "$NAMEDPARAM_STDOUT"
|
||||
@@ -720,8 +1009,362 @@ check_fixture_output \
|
||||
"$CANON_FIXTURE_DIR/minimal_linear.events" \
|
||||
"$RUN_STDOUT"
|
||||
|
||||
DO_WHILE_BREAK_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.do_while_break.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "file_read_count=30" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "file_execute_count=30" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: must-execute-outer" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: must-execute-nested" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: must-execute-inner" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: post-inner-while" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: post-nested-while" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: post-outer-while" "$DO_WHILE_BREAK_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$DO_WHILE_BREAK_STDOUT"
|
||||
if grep -Fq "canon_event=MESSAGE: do-not-execute" "$DO_WHILE_BREAK_STDOUT"; then
|
||||
echo "unexpected do-while-break skipped branch event" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OWORD_BUG315_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.oword_bug315.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "file_read_count=23" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "file_execute_count=23" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: running sub" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: breaking out of sub" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: done" "$OWORD_BUG315_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$OWORD_BUG315_STDOUT"
|
||||
|
||||
OWORD_BUG315_P2_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.oword_bug315_p2.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$OWORD_BUG315_P2_STDOUT"
|
||||
grep -Fq "file_read_count=26" "$OWORD_BUG315_P2_STDOUT"
|
||||
grep -Fq "file_execute_count=26" "$OWORD_BUG315_P2_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=7 x=2 y=2 z=2" "$OWORD_BUG315_P2_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: executing this one" "$OWORD_BUG315_P2_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$OWORD_BUG315_P2_STDOUT"
|
||||
if grep -Fq "canon_event=MESSAGE: not executing this one" "$OWORD_BUG315_P2_STDOUT"; then
|
||||
echo "unexpected oword-bug315-p2 skipped subroutine event" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INTERP_EXISTS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.interp_exists.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "file_read_count=7" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "file_execute_count=7" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=2 x=1 y=0 z=1" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: comment" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=6 x=1 y=0 z=0" "$INTERP_EXISTS_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$INTERP_EXISTS_STDOUT"
|
||||
|
||||
SIM_AXIS_FOAM_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sim_axis_foam.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SIM_AXIS_FOAM_STDOUT"
|
||||
grep -Fq "file_read_count=23" "$SIM_AXIS_FOAM_STDOUT"
|
||||
if grep -Fq "Bad character 'u' used" "$SIM_AXIS_FOAM_STDOUT"; then
|
||||
echo "axis_foam INI did not enable U/V axis readers" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SIM_BRIDGEMILL_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sim_bridgemill.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SIM_BRIDGEMILL_STDOUT"
|
||||
if grep -Fq "Bad character 'w' used" "$SIM_BRIDGEMILL_STDOUT"; then
|
||||
echo "bridgemill INI did not enable W axis reader" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SIM_GEOMETRY_XYZC_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sim_geometry_xyzc.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SIM_GEOMETRY_XYZC_STDOUT"
|
||||
grep -Fq "canon_event=USER_M_COMMAND code=M110" "$SIM_GEOMETRY_XYZC_STDOUT"
|
||||
if grep -Fq "Unknown m code used: M110" "$SIM_GEOMETRY_XYZC_STDOUT"; then
|
||||
echo "xyzc INI did not register USER_M_PATH M110" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SIM_EXTERNAL_OFFSETS_DYN_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sim_external_offsets_dyn.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SIM_EXTERNAL_OFFSETS_DYN_STDOUT"
|
||||
grep -Fq "canon_event=USER_M_COMMAND code=M111" "$SIM_EXTERNAL_OFFSETS_DYN_STDOUT"
|
||||
if grep -Fq "Unknown m code used: M111" "$SIM_EXTERNAL_OFFSETS_DYN_STDOUT"; then
|
||||
echo "external_offsets INI did not register USER_M_PATH M111" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RETURN_VALUE_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.return_value.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "file_read_count=75" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "file_execute_count=75" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: line 6.000000: _value: - expected 0.000000, got 0.000000" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: line 28.000000: call with arg1=2.000000 expect 246.000000, got 246.000000" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: line 37.000000: call with arg1=-1.000000 expect 0.000000, got 0.000000" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: line 47.000000: call with arg1=0.000000 expect 4712.000000, got 4712.000000" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: line 53.000000: _value=4712.000000 - expected 4712.000000" "$RETURN_VALUE_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$RETURN_VALUE_STDOUT"
|
||||
if grep -Fq "fail:" "$RETURN_VALUE_STDOUT"; then
|
||||
echo "unexpected return-value failure message" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SUBS_FOLLOW_MAIN_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.subs_follow_main.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
grep -Fq "file_read_count=9" "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
grep -Fq "file_execute_count=9" "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: Subs may follow main program " "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
grep -Fq "canon_event=PALLET_SHUTTLE" "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$SUBS_FOLLOW_MAIN_STDOUT"
|
||||
|
||||
FRACTIONAL_LINENUMBERS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.fractional_linenumbers.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "file_read_count=4" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "file_execute_count=4" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "canon_event=SET_SPINDLE_SPEED spindle=0 speed=300" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "canon_event=SET_SPINDLE_SPEED spindle=0 speed=600" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "canon_event=SET_SPINDLE_SPEED spindle=0 speed=1200" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$FRACTIONAL_LINENUMBERS_STDOUT"
|
||||
|
||||
NAMEDPARAM_BUG424_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.namedparam_bug424.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "file_read_count=6" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "file_execute_count=6" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "setup.current_x=2" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "setup.current_y=3" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "setup.current_z=4" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "canon_event=USE_LENGTH_UNITS units=1" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=5 x=2 y=3 z=4" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$NAMEDPARAM_BUG424_STDOUT"
|
||||
|
||||
G6164_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g6164.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$G6164_STDOUT"
|
||||
grep -Fq "file_read_count=6" "$G6164_STDOUT"
|
||||
grep -Fq "file_execute_count=6" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_MOTION_CONTROL_MODE mode=3 tolerance=0" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_NAIVECAM_TOLERANCE tolerance=0" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_MOTION_CONTROL_MODE mode=3 tolerance=1" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_NAIVECAM_TOLERANCE tolerance=1" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_NAIVECAM_TOLERANCE tolerance=2" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_MOTION_CONTROL_MODE mode=2 tolerance=0" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=SET_MOTION_CONTROL_MODE mode=1 tolerance=0" "$G6164_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$G6164_STDOUT"
|
||||
|
||||
ROTATION_ABS_PTS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.rotation_abs_pts.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$ROTATION_ABS_PTS_STDOUT"
|
||||
grep -Fq "file_read_count=192" "$ROTATION_ABS_PTS_STDOUT"
|
||||
grep -Fq "file_execute_count=192" "$ROTATION_ABS_PTS_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$ROTATION_ABS_PTS_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$ROTATION_ABS_PTS_STDOUT"
|
||||
if [[ "$(grep -Fc "canon_event=MESSAGE: 0.000000 0.000000 0.000000" "$ROTATION_ABS_PTS_STDOUT")" != "14" ]]; then
|
||||
echo "unexpected rotation/abs-pts zero absolute-position message count" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$(grep -Fc "canon_event=MESSAGE: 1.000000 2.000000 3.000000" "$ROTATION_ABS_PTS_STDOUT")" != "14" ]]; then
|
||||
echo "unexpected rotation/abs-pts target absolute-position message count" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ROTATION_G28_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.rotation_g28.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "file_read_count=13" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "file_execute_count=13" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=SET_XY_ROTATION rotation=45" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: G55 G28" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=9 x=10 y=10 z=0" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: G56 G28" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=14 x=0 y=14.1421 z=0 a=1" "$ROTATION_G28_STDOUT"
|
||||
grep -Eq "canon_event=STRAIGHT_TRAVERSE line=14 x=(0|[0-9.e-]+) y=14\\.1421 z=0 a=0" "$ROTATION_G28_STDOUT"
|
||||
grep -Fq "canon_event=FINISH" "$ROTATION_G28_STDOUT"
|
||||
|
||||
ROTATION_G53_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.rotation_g53.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "file_read_count=17" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "file_execute_count=17" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=SET_XY_ROTATION rotation=45" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: g53 + g55 to 1,1" "$ROTATION_G53_STDOUT"
|
||||
grep -Eq "canon_event=STRAIGHT_TRAVERSE line=8 x=1\\.41421 y=([0-9.e-]+) z=0" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: g53 + g55 + g92 to 1,1" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=13 x=0 y=0 z=0" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: g53 + g56 + g92 to 1,1" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=18 x=-0.414214 y=1 z=0 a=1" "$ROTATION_G53_STDOUT"
|
||||
grep -Fq "canon_event=FINISH" "$ROTATION_G53_STDOUT"
|
||||
|
||||
SUB_CALL_FROM_SUB_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sub_call_from_sub.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "file_read_count=10" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "file_execute_count=10" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "X caller: 1.000000 2.000000 3.000000" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "X helper: 4.000000 5.000000 6.000000" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: Test: calling a sub from within another sub is valid" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$SUB_CALL_FROM_SUB_STDOUT"
|
||||
|
||||
SEQUENCE_NUMBER_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.sequence_number.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "file_read_count=13" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "file_execute_count=13" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: main: line=7.000000 - expect 7" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: in rm400.ngc line=2.000000 - expect 2" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: main: line=9.000000 - expect 9" "$SEQUENCE_NUMBER_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$SEQUENCE_NUMBER_STDOUT"
|
||||
|
||||
NESTED_SUB_ERROR_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.nested_sub_error.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$NESTED_SUB_ERROR_STDOUT"
|
||||
grep -Fq "file_read_4=5" "$NESTED_SUB_ERROR_STDOUT"
|
||||
grep -Fq "file_read_count=4" "$NESTED_SUB_ERROR_STDOUT"
|
||||
grep -Fq "file_execute_count=3" "$NESTED_SUB_ERROR_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: Test: nested sub definition inside named sub should error" "$NESTED_SUB_ERROR_STDOUT"
|
||||
if grep -Fq "canon_event=PROGRAM_END" "$NESTED_SUB_ERROR_STDOUT"; then
|
||||
echo "unexpected nested-sub-error program end" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NESTED_SUB_IN_FILE_ERROR_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.nested_sub_in_file_error.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "file_execute_5=5" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "file_error_text=Subroutine 'O200' not found -- not in offset table and no file '" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "file_read_count=5" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "file_execute_count=5" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: Test: numbered sub after named endsub in same file should error" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: sequential main: 7.000000 8.000000 9.000000" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"
|
||||
if grep -Fq "canon_event=PROGRAM_END" "$NESTED_SUB_IN_FILE_ERROR_STDOUT"; then
|
||||
echo "unexpected nested-sub-in-file-error program end" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OWORD_UNWIND_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.oword_unwind.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "file_read_5=5" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "file_read_10=5" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "file_read_count=11" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "file_execute_count=9" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: pre divide-by-zero" "$OWORD_UNWIND_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$OWORD_UNWIND_STDOUT"
|
||||
if grep -Fq "canon_event=MESSAGE: post divide-by-zero" "$OWORD_UNWIND_STDOUT"; then
|
||||
echo "unexpected oword-unwind post-error message" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ABORT_HOT_COMMENT_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.abort_hot_comment.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$ABORT_HOT_COMMENT_STDOUT"
|
||||
grep -Fq "file_read_count=125" "$ABORT_HOT_COMMENT_STDOUT"
|
||||
grep -Fq "file_execute_count=125" "$ABORT_HOT_COMMENT_STDOUT"
|
||||
grep -Fq "file_saw_error=1" "$ABORT_HOT_COMMENT_STDOUT"
|
||||
grep -Fq "file_error_text= MixedCase param42=20.000000 named=4711.000000 INI=3.140000" "$ABORT_HOT_COMMENT_STDOUT"
|
||||
if grep -Fq "canon_event=PROGRAM_END" "$ABORT_HOT_COMMENT_STDOUT"; then
|
||||
echo "abort-hot-comment unexpectedly reached program end" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
M19_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m19.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M19_STDOUT"
|
||||
grep -Fq "file_read_count=8" "$M19_STDOUT"
|
||||
grep -Fq "file_execute_count=8" "$M19_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=ORIENT_SPINDLE spindle=0 orientation=87 mode=0" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=WAIT_SPINDLE_ORIENT_COMPLETE spindle=0 timeout=2" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=ORIENT_SPINDLE spindle=0 orientation=42 mode=1" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=ORIENT_SPINDLE spindle=0 orientation=132 mode=0" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=ORIENT_SPINDLE spindle=0 orientation=132 mode=1" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=WAIT_SPINDLE_ORIENT_COMPLETE spindle=0 timeout=1" "$M19_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M19_STDOUT"
|
||||
|
||||
MAGIC_COMMENTS_PARAM_FORMAT_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.magic_comments_param_format.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "file_read_count=13" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "file_execute_count=13" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: native value = 1.123457" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test round to integer: 1" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test round to 4 decimals: 1.1235" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test format separate from param: The value is: 1.1235" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test round to 7 decimals: 1.1234568" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: native value2 = 2.345679" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test2 round all params in line to 4 decimals: The values are: 1.1235, 2.3457" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=MESSAGE: Test2 only round last value to integer: The values are: 1.123457, 2" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$MAGIC_COMMENTS_PARAM_FORMAT_STDOUT"
|
||||
|
||||
M98M99_01_BASICS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_01_basics.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "file_read_count=22" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "file_execute_count=22" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: A simple O sub example " "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1" "$M98M99_01_BASICS_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_01_BASICS_STDOUT"
|
||||
|
||||
M98M99_02_VARIABLES_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_02_variables.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "file_read_count=54" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "file_execute_count=54" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "Q MAIN/FANUC: POST-M98: 1=13.010000; 30=13.300000; 31=13.310000" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "Q MAIN/RS274NGC: POST-O-CALL: 1=42.010000; 30=42.300000; 31=13.310000" "$M98M99_02_VARIABLES_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_02_VARIABLES_STDOUT"
|
||||
|
||||
M98M99_07_NESTED_SUBS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_07_nested_subs.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "file_read_count=163" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "file_execute_count=163" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "X >>>> LOOP [O2.O1]: 4.500000" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "X MAIN END: 1=5.000000" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_07_NESTED_SUBS_STDOUT"
|
||||
|
||||
M98M99_08_SUB_FOLLOWS_MAIN_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_08_sub_follows_main.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "file_read_count=9" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "file_execute_count=9" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "X IN O1" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: Fanuc-style subs may follow main program " "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT"
|
||||
|
||||
M98M99_10_M98_P001_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_10_m98_p001.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "file_read_count=8" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "file_execute_count=8" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "x got here" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: main program" "$M98M99_10_M98_P001_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_10_M98_P001_STDOUT"
|
||||
if awk '
|
||||
/^file_read_1=0$/ { in_file = 1 }
|
||||
in_file && /ERROR: should not get here/ { found = 1 }
|
||||
END { exit(found ? 0 : 1) }
|
||||
' "$M98M99_10_M98_P001_STDOUT"; then
|
||||
echo "unexpected m98m99 leading-zero O-word fallback branch" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
M98M99_13_NAMED_PROGRAM_NAMED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_13_named_program_named.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "file_read_count=4" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "file_execute_count=4" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: test-named.ngc: Test named programs" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: ...program body" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
|
||||
|
||||
M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_13_named_program_numbered.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "file_read_count=4" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "file_execute_count=4" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: test-numbered.ngc: Test numbered programs" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "canon_event=COMMENT: ...program body" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_13_NAMED_PROGRAM_NUMBERED_STDOUT"
|
||||
|
||||
M98M99_14_O_EXPRESSION_CALL_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_14_o_expression_call.run.stdout.log"
|
||||
grep -Fq "file_open=0" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "file_read_count=29" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "file_execute_count=29" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "file_saw_error=0" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "In sub 100" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "In sub 200" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
grep -Fq "canon_event=PROGRAM_END" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
|
||||
|
||||
for fixture in "$GCODE_FIXTURE_DIR"/*.ngc; do
|
||||
name="$(basename "$fixture" .ngc)"
|
||||
if [[ "$name" == "disable_fanuc_style_sub_m98" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
expected="$CANON_FIXTURE_DIR/$name.events"
|
||||
if [[ ! -f "$expected" ]]; then
|
||||
echo "missing expected canon fixture: $expected" >&2
|
||||
@@ -737,9 +1380,62 @@ for fixture in "$GCODE_FIXTURE_DIR"/*.ngc; do
|
||||
if [[ "$name" == "oword_subroutine" || "$name" == "percent_file_finish" ]]; then
|
||||
require_mdi=0
|
||||
fi
|
||||
if [[ "$name" == "namedparam_semantics" ||
|
||||
"$name" == "namedparam_ini_semantics" ||
|
||||
"$name" == "ini_tool_table" ||
|
||||
"$name" == "spindle_orient_offset" ]]; then
|
||||
continue
|
||||
fi
|
||||
check_fixture_output "$fixture" "$expected" "$stdout_file" "$require_mdi"
|
||||
done
|
||||
|
||||
for name in namedparam_semantics namedparam_ini_semantics; do
|
||||
fixture="$GCODE_FIXTURE_DIR/$name.ngc"
|
||||
expected="$CANON_FIXTURE_DIR/$name.events"
|
||||
stdout_file="$BUILD_DIR/linuxcnc_interp_minimal_harness.$name.with_ini.stdout.log"
|
||||
stderr_file="$BUILD_DIR/linuxcnc_interp_minimal_harness.$name.with_ini.stderr.log"
|
||||
"$BUILD_DIR/linuxcnc_interp_minimal_harness" "$fixture" "$NAMEDPARAM_INI_FIXTURE" \
|
||||
>"$stdout_file" \
|
||||
2>"$stderr_file"
|
||||
check_fixture_output "$fixture" "$expected" "$stdout_file"
|
||||
done
|
||||
|
||||
INI_TOOL_TABLE_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.ini_tool_table.with_ini.stdout.log"
|
||||
INI_TOOL_TABLE_STDERR="$BUILD_DIR/linuxcnc_interp_minimal_harness.ini_tool_table.with_ini.stderr.log"
|
||||
"$BUILD_DIR/linuxcnc_interp_minimal_harness" \
|
||||
"$GCODE_FIXTURE_DIR/ini_tool_table.ngc" \
|
||||
"$ROOT_DIR/tests/fixtures/ini/ini_tool_table.ini" \
|
||||
>"$INI_TOOL_TABLE_STDOUT" \
|
||||
2>"$INI_TOOL_TABLE_STDERR"
|
||||
check_fixture_output \
|
||||
"$GCODE_FIXTURE_DIR/ini_tool_table.ngc" \
|
||||
"$CANON_FIXTURE_DIR/ini_tool_table.events" \
|
||||
"$INI_TOOL_TABLE_STDOUT"
|
||||
|
||||
SPINDLE_ORIENT_OFFSET_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.spindle_orient_offset.with_ini.stdout.log"
|
||||
SPINDLE_ORIENT_OFFSET_STDERR="$BUILD_DIR/linuxcnc_interp_minimal_harness.spindle_orient_offset.with_ini.stderr.log"
|
||||
"$BUILD_DIR/linuxcnc_interp_minimal_harness" \
|
||||
"$GCODE_FIXTURE_DIR/spindle_orient_offset.ngc" \
|
||||
"$SPINDLE_ORIENT_OFFSET_INI_FIXTURE" \
|
||||
>"$SPINDLE_ORIENT_OFFSET_STDOUT" \
|
||||
2>"$SPINDLE_ORIENT_OFFSET_STDERR"
|
||||
check_fixture_output \
|
||||
"$GCODE_FIXTURE_DIR/spindle_orient_offset.ngc" \
|
||||
"$CANON_FIXTURE_DIR/spindle_orient_offset.events" \
|
||||
"$SPINDLE_ORIENT_OFFSET_STDOUT"
|
||||
|
||||
DISABLE_FANUC_STYLE_SUB_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.disable_fanuc_style_sub_m98.with_ini.stdout.log"
|
||||
DISABLE_FANUC_STYLE_SUB_STDERR="$BUILD_DIR/linuxcnc_interp_minimal_harness.disable_fanuc_style_sub_m98.with_ini.stderr.log"
|
||||
"$BUILD_DIR/linuxcnc_interp_minimal_harness" \
|
||||
"$GCODE_FIXTURE_DIR/disable_fanuc_style_sub_m98.ngc" \
|
||||
"$DISABLE_FANUC_STYLE_SUB_INI_FIXTURE" \
|
||||
>"$DISABLE_FANUC_STYLE_SUB_STDOUT" \
|
||||
2>"$DISABLE_FANUC_STYLE_SUB_STDERR"
|
||||
grep -Fq "file_open=0" "$DISABLE_FANUC_STYLE_SUB_STDOUT"
|
||||
grep -Fq "file_saw_error=1" "$DISABLE_FANUC_STYLE_SUB_STDOUT"
|
||||
grep -Fq "file_error_text=DISABLE_FANUC_STYLE_SUB set in INI file, but found m98" \
|
||||
"$DISABLE_FANUC_STYLE_SUB_STDOUT"
|
||||
|
||||
for fixture in "$GCODE_ERROR_FIXTURE_DIR"/*.ngc; do
|
||||
name="$(basename "$fixture" .ngc)"
|
||||
expected="$CANON_ERROR_FIXTURE_DIR/$name.expected"
|
||||
@@ -770,4 +1466,6 @@ for fixture in "$GCODE_ERROR_FIXTURE_DIR"/*.ngc; do
|
||||
done < "$expected"
|
||||
done
|
||||
|
||||
printf '%s\n' "$NATIVE_PROBE_VALIDATION_FINGERPRINT" > "$VALIDATION_CACHE_KEY_FILE"
|
||||
printf '%s\n' "$NATIVE_PROBE_VALIDATION_FINGERPRINT" > "$VALIDATION_CACHE_OK_FILE"
|
||||
echo "native probe validation complete"
|
||||
|
||||
Reference in New Issue
Block a user