nc_program_manager/field-test/t05_offset_non_supportati.bat
Trentin Davide 85d0b579aa fix(validator,field-test): unblock Fanuc/Mitsubishi upload (ISS-018, ISS-019)
ISS-018: FanucProgram.Standardize() prepends a leading '\n' to the
program body, so the O#### header is not on lines[0]. The validator
first-line check read lines[0] and always failed "First line must be
O####", rejecting every valid Fanuc/Mitsubishi upload. Scan the first
non-blank line instead. Upload (FOCAS tape) format unchanged.

ISS-019: field-test .bat files passed -pathprogramma unquoted; on
install paths with spaces ("visual studio prove") cmd split the arg and
ArgParser captured only the first token -> truncated path. Quote the
arg in all 7 scripts.

Add regression test Validate_LeadingBlankLineBeforeONumber for both
Fanuc and Mitsubishi.

Surfaced by field testing against a local docker FTP server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 09:42:46 +02:00

27 lines
1.2 KiB
Batchfile

@echo off
REM ============================================================
REM T05 - Tool offset / Work zero NON supportati su Mitsubishi
REM Attesi:
REM -tooloffset -> -205 "ToolOffset non supportato per questo produttore"
REM -workzero -> -206 "WorkZeroOffset non supportato per questo produttore"
REM (supportati solo da Fanuc via FOCAS). Conferma gating corretto.
REM ============================================================
setlocal
call "%~dp0config.bat"
if not exist "%RESULTS%" mkdir "%RESULTS%"
set LOG=%RESULTS%\t05_offset.log
echo === T05 OFFSET NON SUPPORTATI === > "%LOG%"
echo. >> "%LOG%"
echo ----- Scarica con -tooloffset ----- >> "%LOG%"
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%RESULTS%\dl_tool.txt" -tooloffset >> "%LOG%" 2>&1
echo EXITCODE_tool=%ERRORLEVEL% >> "%LOG%"
echo. >> "%LOG%"
echo ----- Scarica con -workzero ----- >> "%LOG%"
"%EXE%" -manufacturer=mitsubishi -azione=Scarica -ip=%IP% -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma="%RESULTS%\dl_wz.txt" -workzero >> "%LOG%" 2>&1
echo EXITCODE_wz=%ERRORLEVEL% >> "%LOG%"
echo Log: %LOG%
type "%LOG%"
endlocal