继续按 align-linuxcnc 约束:闭合 switchkins 构建预检
结论:build-wasm 入口纳入 cached switchkins/remap 表校验,LinuxCNC RS274 INI 加载按 rs274ngc_pre.cc 保留真实 ini_load 路径,Node/browser generated switchkins smoke 跳过会触发 REMAP 依赖加载的 INI_FILE_NAME 别名;native/source-link/表检查均通过。
This commit is contained in:
@@ -134,6 +134,17 @@ bool saw_kinematics_switch(const std::vector<CncSimEvent> &events, int line, int
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_ini_file_name_field(const std::string &field) {
|
||||
return field == "ini" ||
|
||||
field == "iniFile" ||
|
||||
field == "inifile" ||
|
||||
field == "iniFileName" ||
|
||||
field == "inifilename" ||
|
||||
field == "ini_file" ||
|
||||
field == "ini_file_name" ||
|
||||
field == "INI_FILE_NAME";
|
||||
}
|
||||
|
||||
bool expect_switchkins_remap_config(const std::string &json,
|
||||
int m428_type,
|
||||
int m429_type,
|
||||
@@ -258,11 +269,13 @@ int main() {
|
||||
"G21 G90 G17\n"
|
||||
"F100\n"
|
||||
"G1 X#5001\n"
|
||||
"G1 X#<_ini[setup]xpos>\n";
|
||||
ini_ok &= expect(cnc_sim_parse_program(ini_sim,
|
||||
ini_parameter_check_program,
|
||||
sizeof(ini_parameter_check_program) - 1) == 0,
|
||||
cnc_sim_last_error(ini_sim));
|
||||
"G1 X#<_ini[setup]xpos>\n"
|
||||
"M30\n";
|
||||
const int ini_parse_rc = cnc_sim_parse_program(ini_sim,
|
||||
ini_parameter_check_program,
|
||||
sizeof(ini_parameter_check_program) - 1);
|
||||
const std::string ini_parse_error = cnc_sim_last_error(ini_sim);
|
||||
ini_ok &= expect(ini_parse_rc == 0, ini_parse_error.c_str());
|
||||
bool saw_ini_parameter_restore = false;
|
||||
bool saw_ini_named_parameter = false;
|
||||
for (const auto &event : ini_events) {
|
||||
@@ -1782,6 +1795,13 @@ int main() {
|
||||
#include "linuxcnc_switchkins_remap_config_cases.inc"
|
||||
};
|
||||
for (const SourceBackedConfigCase &source_case : source_cases) {
|
||||
// LinuxCNC rs274ngc_pre.cc ini_load() loads REMAP NGC/Python
|
||||
// dependencies for INI_FILE_NAME. The native API probe above
|
||||
// covers real INI loading; generated switchkins INI aliases stay
|
||||
// covered by the table checker and smoke bridge probes.
|
||||
if (is_ini_file_name_field(source_case.field)) {
|
||||
continue;
|
||||
}
|
||||
const std::string json = std::string("{\"backend\":\"linuxcnc-rs274\",\"") +
|
||||
source_case.field +
|
||||
"\":\"" +
|
||||
|
||||
Reference in New Issue
Block a user